septastic/Dockerfile
Nicholas Orlowsky 534c36b0f7
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 26m18s
fix service
2025-09-14 13:49:34 -04:00

35 lines
675 B
Docker

FROM rust:alpine as build
ENV PKG_CONFIG_ALLOW_CROSS=1
ENV SCCACHE_DIR=/build-cache
ENV RUSTC_WRAPPER=sccache
RUN apk add pkgconfig openssl-dev libc-dev openssl-libs-static sccache
WORKDIR .
COPY ./api ./api
COPY ./libseptastic/ ./libseptastic/
COPY ./api/assets ./assets
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
RUN ls -lah
RUN pwd
ENTRYPOINT ["./septastic_api"]