Skip to content

Commit f73894f

Browse files
committed
Allowing setting of the ports at the environment variable level so the apps are aware of them
1 parent 48af479 commit f73894f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,12 @@ COPY --from=builder /app/client/bin ./client/bin
4141
COPY --from=builder /app/server/build ./server/build
4242
COPY --from=builder /app/cli/build ./cli/build
4343

44+
# Set default port values as environment variables
45+
ENV CLIENT_PORT=6274
46+
ENV SERVER_PORT=6277
47+
4448
# Document which ports the application uses internally
45-
EXPOSE 6274 6277
49+
EXPOSE ${CLIENT_PORT} ${SERVER_PORT}
4650

4751
# Use ENTRYPOINT with CMD for arguments
4852
ENTRYPOINT ["npm", "start"]

0 commit comments

Comments
 (0)