From ad4d52158303c8e3fa105eb805aef3243ed2b67e Mon Sep 17 00:00:00 2001 From: "Noah Hanford (spaced)" Date: Wed, 18 Feb 2026 15:32:46 -0500 Subject: [PATCH 1/2] moved gunicorn config out of dockerfile args --- Dockerfile | 3 ++- gunicorn.conf.py | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 gunicorn.conf.py diff --git a/Dockerfile b/Dockerfile index 2817415d..e34659b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,4 +40,5 @@ COPY --from=build-frontend /opt/conditional/conditional/static /opt/conditional/ RUN ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime -CMD ["sh", "-c", "gunicorn conditional:app --bind=0.0.0.0:${PORT} --access-logfile=- --timeout=256"] +CMD ["sh", "-c", "gunicorn conditional:app"] + diff --git a/gunicorn.conf.py b/gunicorn.conf.py new file mode 100644 index 00000000..1c399b91 --- /dev/null +++ b/gunicorn.conf.py @@ -0,0 +1,6 @@ +import os + +bind = f'0.0.0.0:{os.getenv('PORT')}' +workers = os.getenv('CONDITIONAL_WORKERS', 1) +accesslog = '-' +timeout = 256 From 38adee11ed293196ba90d5fc66f0c790591e5503 Mon Sep 17 00:00:00 2001 From: "Noah Hanford (spaced)" Date: Wed, 18 Feb 2026 15:35:39 -0500 Subject: [PATCH 2/2] moved gunicorn config out of dockerfile Now you can just run it with `gunicorn` --- Dockerfile | 2 +- gunicorn.conf.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e34659b6..d6b15b39 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,5 +40,5 @@ COPY --from=build-frontend /opt/conditional/conditional/static /opt/conditional/ RUN ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime -CMD ["sh", "-c", "gunicorn conditional:app"] +CMD ["sh", "-c", "gunicorn"] diff --git a/gunicorn.conf.py b/gunicorn.conf.py index 1c399b91..9fb31c45 100644 --- a/gunicorn.conf.py +++ b/gunicorn.conf.py @@ -1,6 +1,7 @@ import os -bind = f'0.0.0.0:{os.getenv('PORT')}' +wsgi_app = 'conditional:app' +bind = f'0.0.0.0:{os.getenv('PORT', 8080)}' workers = os.getenv('CONDITIONAL_WORKERS', 1) accesslog = '-' timeout = 256