Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build secrets #307

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ WORKDIR /app
ARG YARN_VERSION=1.22.19
RUN npm install -g yarn@$YARN_VERSION --force

# Define arguments for build time
ARG apiKey
ARG authDomai
ARG projectId
ARG storageBucket
ARG messagingSenderId
ARG appId
ARG measurementId
ARG credentials_base64

# Set build time environment variables
ENV apiKey=${apiKey}
ENV authDomai=${authDomai}
ENV projectId=${projectId}
ENV storageBucket=${storageBucket}
ENV messagingSenderId=${messagingSenderId}
ENV appId=${appId}
ENV measurementId=${measurementId}
ENV credentials_base64=${credentials_base64}

# Throw-away build stage to reduce size of final image
FROM base as install
Expand Down
13 changes: 1 addition & 12 deletions web/Dockerfile.staging
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,7 @@ RUN yarn install --frozen-lockfile --production=false
COPY --link . .

# Set build time environment variables
ENV VITE_API_URL="https://wdcc-volunteers-api-staging.fly.dev"

ENV apiKey = ${apiKey}
ENV authDomain = ${authDomain}
ENV projectId = ${projectId}
ENV storageBucket = ${storageBucket}
ENV messagingSenderId = ${messagingSenderId}
ENV appId = ${appId}
ENV measurementId = ${measurementId}

ENV credentials_base64 = ${credentials_base64}

ENV VITE_API_URL="https://wdcc-volunteers-api.fly.dev"

# Build application
RUN yarn run build
Expand Down
Loading