diff --git a/.dockerignore b/.dockerignore index dd4f77d..bda64ec 100644 --- a/.dockerignore +++ b/.dockerignore @@ -18,3 +18,5 @@ build_static .history log .Dockerfile +.env +.devcontainer diff --git a/Dockerfile b/Dockerfile index 16cebd3..664d2e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,11 @@ ENV PYTHONUNBUFFERED 1 RUN mkdir /code WORKDIR /code RUN apt-get update && apt-get install -y --no-install-recommends \ -libpq-dev \ -gcc \ + libpq-dev \ + gcc \ && \ -apt-get clean && \ -rm -rf /var/lib/apt/lists/* + apt-get clean && \ + rm -rf /var/lib/apt/lists/* ADD requirements.txt /code/ RUN pip install --no-cache-dir -r requirements.txt ADD . /code/ @@ -15,4 +15,4 @@ ADD . /code/ RUN python -m pip install gunicorn RUN python manage.py collectstatic --no-input --clear -CMD bash -c "python manage.py migrate && gunicorn -b 0.0.0.0:8000 --capture-output --error-logfile - --access-logfile - spejstore.wsgi:application" +CMD bash -c "python manage.py migrate && gunicorn --workers 1 --threads 4 -b 0.0.0.0:8000 --capture-output --error-logfile - --access-logfile - spejstore.wsgi:application" diff --git a/docker-compose.yml b/docker-compose.yml index 359337a..7f31116 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ services: web: build: . restart: always - command: bash -c "python manage.py migrate && gunicorn -b 0.0.0.0:8000 --capture-output --error-logfile - --access-logfile - spejstore.wsgi:application" + command: bash -c "python manage.py migrate && gunicorn --workers 1 --threads 4 -b 0.0.0.0:8000 --capture-output --error-logfile - --access-logfile - spejstore.wsgi:application" volumes: - .:/code - /code/build_static