Make internal and host ports configurable via env vars
This commit is contained in:
parent
fa01ac0f32
commit
3ef8aaf45a
5 changed files with 12 additions and 6 deletions
|
|
@ -17,6 +17,8 @@ ENV PYTHONUNBUFFERED=1
|
|||
RUN useradd -m -u 1000 boothuser && mkdir -p /app/data /app/uploads && chown -R boothuser:boothuser /app
|
||||
USER boothuser
|
||||
|
||||
# Default internal port; override with INTERNAL_PORT env var
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["gunicorn", "-b", "0.0.0.0:8000", "--access-logfile", "-", "app:app"]
|
||||
# Use shell form so environment variables are expanded at runtime
|
||||
CMD gunicorn -b 0.0.0.0:${INTERNAL_PORT:-8000} --access-logfile - app:app
|
||||
|
|
|
|||
Reference in a new issue