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

ARG EXTRAS=deploy

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

# Used by the healthcheck and shared library used by psycopg2.
RUN apk add --no-cache curl postgresql-dev

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"]