diff --git a/Dockerfile b/Dockerfile index fe9afd20..6c93f790 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN apt-get update && apt-get install -y \ RUN pip install --no-cache-dir -U pip COPY requirements.txt /build/ -RUN pip install --user --no-cache-dir -r requirements.txt && pip install --user --no-cache-dir uwsgi +RUN pip install --user --no-cache-dir -r requirements.txt ### Final image FROM python:3.9-slim-buster diff --git a/requirements.txt b/requirements.txt index 8a173eac..06714cde 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ django-extensions==3.1.3 jinja2==2.11.3 PyMySQL==1.0.2 yolk==0.4.3 +uwsgi==2.0.20 diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index c4ce42f2..39228d4c 100755 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -41,13 +41,21 @@ function start_server() { if [ $r_flag == 0 ]; then - uwsgi --http-socket 0.0.0.0:3031 --module agagd.wsgi \ - --static-map /static=/tmp/static/ --static-map /media=/srv/media \ - --enable-threads --python-autoreload 1 + uwsgi --http-socket 0.0.0.0:3031 \ + --module agagd.wsgi \ + --static-map /static=/tmp/static/ \ + --static-map /media=/srv/media \ + --enable-threads \ + --python-autoreload 1 \ + --processes 2 elif [ $r_flag == 1 ]; then - uwsgi --http-socket 0.0.0.0:3031 --module agagd.wsgi \ - --static-map /static=/tmp/static/ --static-map /media=/srv/media + uwsgi --http-socket 0.0.0.0:3031 \ + --module agagd.wsgi \ + --static-map /static=/tmp/static/ \ + --static-map /media=/srv/media + --enable-threads \ + --processes 2 fi }