Some checks failed
Build and Release Docker Images / build-and-push (./backend, public/Dockerfile, my-website-v2_public) (pull_request) Failing after 23m10s
Build and Release Docker Images / build-and-push (./backend, task/Dockerfile, my-website-v2_task) (pull_request) Failing after 24m49s
Build and Release Docker Images / build-and-push (./frontend, Dockerfile, my-website-v2_frontend) (pull_request) Failing after 20m2s
Build and Release Docker Images / create-release (pull_request) Has been skipped
it should help from builds from failing in addition to slimming down the artifact size
30 lines
538 B
Docker
30 lines
538 B
Docker
# Build stage
|
|
FROM rust:1.88.0 AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY ./task ./task
|
|
COPY ./cache ./cache
|
|
COPY ./storage ./storage
|
|
|
|
RUN cargo build --release --manifest-path ./task/Cargo.toml
|
|
|
|
# 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
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["/app/task"]
|