Update
This commit is contained in:
parent
501b9d3093
commit
964534d0d9
21 changed files with 762 additions and 207 deletions
|
@ -29,13 +29,13 @@ RUN cargo chef prepare --recipe-path recipe.json
|
|||
FROM chef as builder
|
||||
WORKDIR /usr/src/backend
|
||||
COPY --from=planner /usr/src/backend/recipe.json .
|
||||
RUN cargo chef cook --recipe-path recipe.json
|
||||
RUN cargo chef cook --release --recipe-path recipe.json
|
||||
RUN rm -rf ./src
|
||||
COPY ./build.rs .
|
||||
COPY --from=static /usr/src/static ./static
|
||||
COPY --from=templates /usr/src/templates ./templates
|
||||
COPY ./src ./src
|
||||
RUN cargo build
|
||||
RUN cargo build --release
|
||||
|
||||
FROM docker.io/debian:bullseye-slim as runner
|
||||
LABEL maintainer="Dominic Grimm <dominic@dergrimm.net>" \
|
||||
|
@ -45,7 +45,6 @@ LABEL maintainer="Dominic Grimm <dominic@dergrimm.net>" \
|
|||
org.opencontainers.image.url="https://git.dergrimm.net/dergrimm/blog"
|
||||
RUN apt update
|
||||
RUN apt install -y libpq5
|
||||
RUN apt install -y ca-certificates
|
||||
RUN apt-get clean
|
||||
RUN apt-get autoremove -y
|
||||
RUN rm -rf /var/lib/{apt,dpkg,cache,log}/
|
||||
|
@ -55,5 +54,5 @@ WORKDIR /usr/src/backend
|
|||
COPY ./run.sh .
|
||||
RUN chmod +x ./run.sh
|
||||
COPY ./migrations ./migrations
|
||||
COPY --from=builder /usr/src/backend/target/debug/backend /usr/src/backend/target/debug/blogctl ./bin/
|
||||
COPY --from=builder /usr/src/backend/target/release/backend /usr/src/backend/target/release/blogctl ./bin/
|
||||
ENTRYPOINT [ "./run.sh" ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue