Update run command

This commit is contained in:
Gabriel Augendre 2022-12-16 21:28:11 +01:00
parent 35df8db8f5
commit 294c1caa50
3 changed files with 1 additions and 7 deletions

View File

@ -96,7 +96,6 @@ COPY --chown=django:django --from=venv $STATIC_ROOT $STATIC_ROOT
WORKDIR /app
COPY pyproject.toml poetry.lock ./
ADD --chown=django:django ./src ./src
ADD --chown=django:django ./docker ./docker
COPY --chown=django:django tasks.py ./tasks.py
@ -110,4 +109,4 @@ WORKDIR /app/src
HEALTHCHECK --start-period=30s CMD python -c "import requests; requests.get('http://localhost:8000', timeout=2)"
USER django
CMD ["/app/docker/run.sh"]
CMD ["gunicorn", "{{cookiecutter.project_slug}}.wsgi", "--graceful-timeout=5", "--worker-tmp-dir=/dev/shm", "--workers=2", "--threads=4", "--worker-class=gthread", "--bind=0.0.0.0:8000", "--log-file=-"]

View File

@ -4,7 +4,6 @@ services:
django:
build: .
image: crocmagnon/{{cookiecutter.project_slug}}
command: /app/src/manage.py runserver 0.0.0.0:8000
env_file:
- envs/docker-local-envs.env
volumes:

View File

@ -1,4 +0,0 @@
#!/bin/bash
set -eux
python manage.py migrate --noinput
gunicorn {{cookiecutter.project_slug}}.wsgi -b 0.0.0.0:8000 --log-file -