septastic/Dockerfile
Nicholas Orlowsky 8fd41b1090
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 6m0s
clean up + update dfile
2025-09-21 19:53:11 -04:00

30 lines
673 B
Docker

FROM rust:1.90-slim-trixie AS build
ENV PKG_CONFIG_ALLOW_CROSS=1
ENV SCCACHE_DIR=/build-cache
ENV RUSTC_WRAPPER=sccache
WORKDIR .
COPY ./api ./api
COPY ./libseptastic/ ./libseptastic/
COPY ./api/assets ./assets
COPY ./api/templates ./templates
RUN apt -y update && apt install -y libssl-dev libc-dev sccache build-essential pkg-config
RUN cd api && cargo build --release
FROM debian:trixie-slim
WORKDIR /app
EXPOSE 8080
COPY --from=build /api/target/release/septastic_api /app/septastic_api
COPY api/assets /app/assets
COPY api/templates /app/templates
RUN apt -y update && apt install -y curl
ENV RUST_LOG=info
ENV EXPOSE_PORT=8080
ENTRYPOINT ["./septastic_api"]