aboutsummaryrefslogtreecommitdiffstats
path: root/docker/app/alpine/3.7/Dockerfile
blob: e7c8d696b6dc8323145896505a9b76bc047250dd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.7-alpine

ARG EXTRAS=deploy

# Build-time dependencies: To be removed later.
RUN apk add --virtual build \
        gcc \
        musl-dev \
        postgresql-dev

# Used by the healthcheck.
RUN apk add --no-cache curl

WORKDIR /app
COPY setup.py /app/setup.py
RUN python3 -m pip install .[$EXTRAS]
# Remove dependencies used for building psycopg2.
RUN apk del --purge build

COPY . .

HEALTHCHECK CMD curl -I -f localhost:4000
CMD ["gunicorn", "--workers", "4", "--bind", "0.0.0.0:4000", "pysite.wsgi:application"]