Skip to content

Commit f73436c

Browse files
committed
2025.02.19 declare env variables in the docker file
1 parent bb874e8 commit f73436c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
FROM node:22-alpine AS base
22

3+
# 1. Declare build arguments
4+
# 2. Convert build arguments into environment variables
5+
ARG GRAPHQL_URI
6+
ENV GRAPHQL_URI=$GRAPHQL_URI
7+
8+
ARG GRAPHQL_SECRET_KEY
9+
ENV GRAPHQL_SECRET_KEY=$GRAPHQL_SECRET_KEY
10+
11+
ARG MONGODB_URI_AUTH
12+
ENV MONGODB_URI_AUTH=$MONGODB_URI_AUTH
13+
14+
ARG URI
15+
ENV URI=$URI
16+
317
FROM base AS deps
418
RUN apk update && apk add --no-cache libc6-compat
519
WORKDIR /app

0 commit comments

Comments
 (0)