BLOG-78 feat: add volume and storage path for static files in Dockerfile
All checks were successful
Frontend CI / build (push) Successful in 1m5s
PR Title Check / pr-title-check (pull_request) Successful in 13s
Auto Comment On PR / add_improve_comment (pull_request) Successful in 13s

This commit is contained in:
SquidSpirit 2025-07-27 12:22:11 +08:00
parent c639a85ff3
commit 5a30642b8f

View File

@ -11,9 +11,11 @@ FROM alpine:latest AS runner
WORKDIR /app WORKDIR /app
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/server . COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/server .
EXPOSE 8080 EXPOSE 8080
VOLUME ["/app/static"]
ENV RUST_LOG=info ENV RUST_LOG=info
ENV HOST=0.0.0.0 ENV HOST=0.0.0.0
ENV PORT=8080 ENV PORT=8080
ENV STORAGE_PATH=/app/static
ENV DATABASE_HOST=127.0.0.1 ENV DATABASE_HOST=127.0.0.1
ENV DATABASE_PORT=5432 ENV DATABASE_PORT=5432
ENV DATABASE_USER=postgres ENV DATABASE_USER=postgres