File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -61,15 +61,19 @@ RUN chmod +x ${APP}/livecards
6161USER $APP_USER
6262WORKDIR ${APP}
6363
64- # Use ARG for build-time configuration, ENV for runtime
64+ # Build-time arg for PORT, default to 8000
6565ARG PORT=8000
66+ # Runtime environment var for PORT, default to build-time arg
6667ENV PORT=${PORT}
6768EXPOSE ${PORT}
6869
70+ # Build-time arg for HOST, default to 0.0.0.0 (ipv4 all interfaces)
71+ ARG HOST=0.0.0.0
72+ # Runtime environment var for HOST, default to build-time arg
73+ ENV HOST=${HOST}
74+
6975# Add health check
7076HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
7177 CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT}/health || exit 1
7278
73- # Use ENTRYPOINT for the executable and CMD for default arguments
74- ENTRYPOINT ["/usr/src/app/livecards" ]
75- CMD ["0.0.0.0:8000" ]
79+ CMD ["sh" , "-c" , "exec ./livecards ${HOST}:${PORT}" ]
You can’t perform that action at this time.
0 commit comments