Skip to content

Commit

Permalink
chore: fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
tale committed Jul 22, 2024
1 parent ddfa768 commit 5686d21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
platforms: linux/arm64
cache-to: type=registry,ref=ghcr.io/cnstr/api-cache,compression=zstd
cache-from: type=registry,ref=ghcr.io/cnstr/api-cache
args: |
build-args: |
CANISTER_META_NAME=${{ steps.secrets.outputs.CANISTER_META_NAME }}
CANISTER_META_DESC=${{ steps.secrets.outputs.CANISTER_META_DESC }}
CANISTER_META_EMAIL=${{ steps.secrets.outputs.CANISTER_META_EMAIL }}
Expand Down
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ ARG CANISTER_OPENAPI_ID
ARG CANISTER_OPENAPI_TOKEN

FROM rust:1.79 as builder
ENV UPLOAD_OPENAPI=true
ENV CANISTER_UPLOAD_OPENAPI=true
WORKDIR /app

ADD . .
RUN cargo build --release -p api
RUN CANISTER_META_NAME=${CANISTER_META_NAME} \
CANISTER_META_DESC=${CANISTER_META_DESC} \
CANISTER_META_EMAIL=${CANISTER_META_EMAIL} \
CANISTER_META_COPYRIGHT=${CANISTER_META_COPYRIGHT} \
CANISTER_API_ENDPOINT=${CANISTER_API_ENDPOINT} \
CANISTER_OPENAPI_ID=${CANISTER_OPENAPI_ID} \
CANISTER_OPENAPI_TOKEN=${CANISTER_OPENAPI_TOKEN} \
cargo build --release -p api

FROM gcr.io/distroless/cc-debian12
COPY --from=builder /app/target/release/api /
Expand Down

0 comments on commit 5686d21

Please sign in to comment.