fix service
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 26m18s
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 26m18s
This commit is contained in:
parent
3d1e213798
commit
534c36b0f7
2 changed files with 20 additions and 8 deletions
20
Dockerfile
20
Dockerfile
|
|
@ -1,11 +1,11 @@
|
|||
FROM rust:1.86.0 as build
|
||||
FROM rust:alpine as build
|
||||
|
||||
ENV PKG_CONFIG_ALLOW_CROSS=1
|
||||
|
||||
ENV SCCACHE_DIR=/build-cache
|
||||
ENV RUSTC_WRAPPER=sccache
|
||||
|
||||
RUN apt update && apt install sccache
|
||||
RUN apk add pkgconfig openssl-dev libc-dev openssl-libs-static sccache
|
||||
|
||||
WORKDIR .
|
||||
COPY ./api ./api
|
||||
|
|
@ -16,8 +16,20 @@ COPY ./api/templates ./templates
|
|||
|
||||
RUN cd api && cargo build --release
|
||||
|
||||
FROM alpine:latest
|
||||
WORKDIR /app
|
||||
RUN apk update \
|
||||
&& apk add openssl ca-certificates
|
||||
|
||||
EXPOSE 8080
|
||||
COPY --from=build /api/target/release/septastic_api /app/septastic_api
|
||||
COPY api/assets /app/assets
|
||||
COPY api/templates /app/templates
|
||||
|
||||
ENV RUST_LOG=info
|
||||
ENV EXPOSE_PORT=8080
|
||||
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/api/target/release/septastic_api"]
|
||||
RUN ls -lah
|
||||
RUN pwd
|
||||
|
||||
ENTRYPOINT ["./septastic_api"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue