use environment variable $PORT to set the port
All checks were successful
Gitea Actions Demo / lint (push) Successful in 26s
Gitea Actions Demo / test (push) Successful in 16s
Gitea Actions Demo / docker (push) Successful in 3m16s

This commit is contained in:
Ryan Cavicchioni 2025-04-20 12:34:43 -05:00
parent 89367e3169
commit c068eacf58
Signed by: ryanc
SSH Key Fingerprint: SHA256:KbXiwUnZnHFwFtt3Bytd+F3FN9pPHn1Z1cxMIE1TPbg

View File

@ -26,6 +26,8 @@ EOT
FROM base
ENV PORT=4567
# RUN useradd ruby --home /app --shell /bin/sh
RUN useradd --home /app --create-home app
@ -37,4 +39,4 @@ COPY --from=build --chown=app:app /app /app
COPY --chown=app:app . .
EXPOSE 4567
CMD [ "bundle", "exec", "rackup", "--host", "0.0.0.0", "--port", "4567" ]
CMD [ "bundle", "exec", "rackup", "--host", "0.0.0.0", "--port", "$PORT" ]