Skip to content

Commit

Permalink
fix: compile to release instead of debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed May 10, 2024
1 parent eda72ee commit 1a2094e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ WORKDIR /app
RUN cargo install cargo-chef

COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --target x86_64-unknown-linux-musl --recipe-path recipe.json
RUN cargo chef cook --release --target x86_64-unknown-linux-musl --recipe-path recipe.json

COPY . .
RUN cargo build --target x86_64-unknown-linux-musl
RUN cargo build --target x86_64-unknown-linux-musl --release

RUN strip /app/target/x86_64-unknown-linux-musl/debug/pdf-rendering-srv
RUN strip /app/target/x86_64-unknown-linux-musl/release/pdf-rendering-srv


FROM alpine
Expand All @@ -37,7 +37,7 @@ RUN apk add --no-cache chromium

WORKDIR /app

COPY --from=build /app/target/x86_64-unknown-linux-musl/debug/pdf-rendering-srv /app/pdf-rendering-srv
COPY --from=build /app/target/x86_64-unknown-linux-musl/release/pdf-rendering-srv /app/pdf-rendering-srv
COPY ./cfg /app/cfg

ENV NODE_ENV=production
Expand Down

0 comments on commit 1a2094e

Please sign in to comment.