Skip to content

Commit 4714fa7

Browse files
moved gunicorn config out of dockerfile args (#477)
* moved gunicorn config out of dockerfile args * moved gunicorn config out of dockerfile Now you can just run it with `gunicorn`
1 parent a0968cc commit 4714fa7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ COPY --from=build-frontend /opt/conditional/conditional/static /opt/conditional/
4040

4141
RUN ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
4242

43-
CMD ["sh", "-c", "gunicorn conditional:app --bind=0.0.0.0:${PORT} --access-logfile=- --timeout=256"]
43+
CMD ["sh", "-c", "gunicorn"]
44+

gunicorn.conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import os
2+
3+
wsgi_app = 'conditional:app'
4+
bind = f'0.0.0.0:{os.getenv('PORT', 8080)}'
5+
workers = os.getenv('CONDITIONAL_WORKERS', 1)
6+
accesslog = '-'
7+
timeout = 256

0 commit comments

Comments
 (0)