From f73894fbf083c044a861b639976fb2b2c2eadbf4 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 4 Jun 2025 12:30:44 +1000 Subject: [PATCH] Allowing setting of the ports at the environment variable level so the apps are aware of them --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5d7724d0..f36fb8bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,8 +41,12 @@ COPY --from=builder /app/client/bin ./client/bin COPY --from=builder /app/server/build ./server/build COPY --from=builder /app/cli/build ./cli/build +# Set default port values as environment variables +ENV CLIENT_PORT=6274 +ENV SERVER_PORT=6277 + # Document which ports the application uses internally -EXPOSE 6274 6277 +EXPOSE ${CLIENT_PORT} ${SERVER_PORT} # Use ENTRYPOINT with CMD for arguments ENTRYPOINT ["npm", "start"] \ No newline at end of file