set PORT and PIDFILE via environment variables
Some checks failed
Gitea Actions Demo / lint (push) Successful in 22s
Gitea Actions Demo / test (push) Successful in 14s
Gitea Actions Demo / docker (push) Has been cancelled

This commit is contained in:
Ryan Cavicchioni 2025-04-28 15:31:09 -05:00
parent b8737c2583
commit 9f873ffaea
Signed by: ryanc
SSH Key Fingerprint: SHA256:FEbwJ3JyWHwYNAM8BqctZ/LmHHg1bzfi/huOj7FxlXU
3 changed files with 8 additions and 4 deletions

View File

@ -1 +1,5 @@
ENV["PUMA_PID"] = Process.pid.to_s
port ENV.fetch("PORT", 4567)
pidfile ENV["PIDFILE"] if ENV["PIDFILE"]

View File

@ -39,5 +39,5 @@ COPY --from=build --chown=app:app /app /app
COPY --chown=app:app . .
EXPOSE 4567
CMD [ "puma", "--bind", "0.0.0.0", "--port", "$PORT" ]
EXPOSE $PORT
CMD [ "puma" ]

View File

@ -40,5 +40,5 @@ COPY --from=build --chown=app:app /app /app
COPY --chown=app:app . .
EXPOSE 4567
CMD [ "puma", "--bind", "0.0.0.0", "--port", "$PORT" ]
EXPOSE $PORT
CMD [ "puma" ]