Files

30 lines
538 B
Docker
Raw Permalink Normal View History

2025-12-21 15:36:00 -05:00
# Build stage
FROM rust:1.88.0 AS builder
2025-07-19 00:44:28 -04:00
WORKDIR /app
2025-07-19 14:00:47 -04:00
COPY ./task ./task
COPY ./cache ./cache
COPY ./storage ./storage
2025-07-19 00:44:28 -04:00
RUN cargo build --release --manifest-path ./task/Cargo.toml
2025-12-21 15:36:00 -05:00
# Runtime stage
FROM debian:bookworm-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /app/posts
COPY --from=builder /app/task/target/release/task /app/task
COPY --from=builder /app/cache ./cache
COPY --from=builder /app/storage ./storage
2025-07-19 00:44:28 -04:00
EXPOSE 3000
2025-12-21 15:36:00 -05:00
CMD ["/app/task"]