forked from ONSdigital/eq-questionnaire-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (17 loc) · 628 Bytes
/
Dockerfile
File metadata and controls
25 lines (17 loc) · 628 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM python:3.9-slim-bullseye
EXPOSE 5000
RUN apt update && apt install -y curl unzip libsnappy-dev build-essential jq wkhtmltopdf
COPY . /runner
WORKDIR /runner
ENV WEB_SERVER_TYPE gunicorn-async
ENV WEB_SERVER_WORKERS 3
ENV WEB_SERVER_THREADS 10
ENV WEB_SERVER_UWSGI_ASYNC_CORES 10
ENV HTTP_KEEP_ALIVE 2
ENV GUNICORN_CMD_ARGS -c gunicorn_config.py
COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock
RUN groupadd -r appuser && useradd -r -g appuser -u 9000 appuser && chown -R appuser:appuser .
RUN pip install pipenv==2018.11.26 && pipenv install --deploy --system && make build
USER appuser
CMD ["sh", "run_app.sh"]