feat: allow port customization

This commit is contained in:
Alessandro Pezzè 2021-05-28 11:52:40 +02:00
parent c3926c9983
commit 810510a556
2 changed files with 3 additions and 2 deletions

View file

@ -18,5 +18,5 @@ RUN addgroup -g 1000 -S pokeapi && \
adduser -u 1000 -S pokeapi -G pokeapi
USER pokeapi
CMD gunicorn config.wsgi:application -c gunicorn.py.ini
CMD gunicorn config.wsgi:application -c gunicorn.conf.py
EXPOSE 80

View file

@ -1,5 +1,6 @@
import os
from multiprocessing import cpu_count
bind = '0.0.0.0:80'
bind = "0.0.0.0:{}".format(os.environ.get("SERVER_PORT", "80"))
workers = cpu_count() * 2
threads = cpu_count() * 2