From e8106f3a43c161ee7c47dd77f6319744e06bb1cd Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Fri, 7 Jun 2024 19:58:47 +0100 Subject: Update Dockerfile to use production run command --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 5aea6dbf..a14af3ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,8 @@ RUN if [ $STATIC_BUILD = "TRUE" ] ; \ then SECRET_KEY=dummy_value poetry run python manage.py distill-local build --traceback --force ; \ fi -# Run web server through custom manager -ENTRYPOINT ["poetry", "run", "python", "manage.py"] -CMD ["run"] +ENTRYPOINT ["poetry", "run"] +CMD ["gunicorn", "--preload", "-b", "0.0.0.0:8000", \ + "pydis_site.wsgi:application", "-w", "2", "--statsd-host", \ + "graphite.default.svc.cluster.local:8125", "--statsd-prefix", "site", \ + "--config", "file:gunicorn.conf.py"] -- cgit v1.2.3