septastic/Dockerfile
Nicholas Orlowsky cc301dd1b8
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 4m52s
dfile updates
2025-11-08 13:31:49 -05:00

31 lines
743 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 protobuf-compiler 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 --from=build /api/config.yaml /app/config.yaml
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"]