docker customizable port

This commit is contained in:
Youe Graillot 2021-11-13 23:46:23 +01:00
parent 9bffe72607
commit a1110b64a3
3 changed files with 7 additions and 3 deletions

View file

@ -1,5 +1,8 @@
FROM python:3.7-alpine
ENV PORT="8000"
# ihatemoney configuration
ENV DEBUG="False" \
ACTIVATE_ADMIN_DASHBOARD="False" \
ACTIVATE_DEMO_PROJECT="True" \
@ -29,5 +32,5 @@ ADD . /src
RUN pip install --no-cache-dir -e /src
VOLUME /database
EXPOSE 8000
EXPOSE ${PORT}
ENTRYPOINT ["/src/conf/entrypoint.sh"]

View file

@ -28,6 +28,6 @@ EOF
# Start gunicorn without forking
exec gunicorn ihatemoney.wsgi:application \
-b 0.0.0.0:8000 \
-b 0.0.0.0:"$PORT" \
--log-syslog \
"$@"

View file

@ -26,5 +26,6 @@ services:
- SQLALCHEMY_TRACK_MODIFICATIONS=False
- ENABLE_CAPTCHA=False
- LEGAL_LINK=
- PORT=8000
ports:
- "8000:8000"