diff --git a/Resources/docker/app/Dockerfile b/Resources/docker/app/Dockerfile index 96dd580b..2c890f22 100644 --- a/Resources/docker/app/Dockerfile +++ b/Resources/docker/app/Dockerfile @@ -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 diff --git a/gunicorn.py.ini b/gunicorn.conf.py similarity index 55% rename from gunicorn.py.ini rename to gunicorn.conf.py index 9db1e924..bc8ebaf6 100644 --- a/gunicorn.py.ini +++ b/gunicorn.conf.py @@ -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