aboutsummaryrefslogtreecommitdiffstats
path: root/docker/app/alpine/3.6/Dockerfile
blob: 0dedd6dadb6d960aef1585d0ba0727a0d98c63ff (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.6-alpine

ARG EXTRAS=deploy

# Build-time dependencies: To be removed later.
RUN apk add --no-cache --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"]