Skip to content

Commit 69f92de

Browse files
committed
updated env variables
1 parent 8ebf954 commit 69f92de

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ RUN npm ci
2121
ARG API_BASE_URL
2222
ARG API_AUTH_KEY
2323

24-
RUN echo "API_BASE_URL=${API_BASE_URL}\nAPI_AUTH_KEY=${API_AUTH_KEY}" > .env
24+
ENV API_BASE_URL=$API_BASE_URL
25+
ENV API_AUTH_KEY=$API_AUTH_KEY
2526

2627
## Build the static site.
2728
RUN npm run build
@@ -30,5 +31,9 @@ RUN npm run build
3031
FROM prod as serve
3132
## Expose the port that Docusaurus will run on.
3233
EXPOSE 3000
34+
35+
ENV NODE_ENV=production
36+
ENV API_BASE_URL=$API_BASE_URL
37+
ENV API_AUTH_KEY=$API_AUTH_KEY
3338
## Run the production server.
3439
CMD ["npm", "run", "serve", "--", "--host", "0.0.0.0"]

0 commit comments

Comments
 (0)