diff options
Diffstat (limited to 'docker')
-rw-r--r-- | docker/app/alpine/3.6/Dockerfile | 13 | ||||
-rw-r--r-- | docker/app/alpine/3.7/Dockerfile | 15 |
2 files changed, 18 insertions, 10 deletions
diff --git a/docker/app/alpine/3.6/Dockerfile b/docker/app/alpine/3.6/Dockerfile index d78930f0..0dedd6da 100644 --- a/docker/app/alpine/3.6/Dockerfile +++ b/docker/app/alpine/3.6/Dockerfile @@ -2,17 +2,22 @@ FROM python:3.6-alpine ARG EXTRAS=deploy -RUN apk add \ +# 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] -COPY . . +# Remove dependencies used for building psycopg2. +RUN apk del --purge build -RUN apk del \ - gcc +COPY . . +HEALTHCHECK CMD curl -I -f localhost:4000 CMD ["gunicorn", "--workers", "4", "--bind", "0.0.0.0:4000", "pysite.wsgi:application"] diff --git a/docker/app/alpine/3.7/Dockerfile b/docker/app/alpine/3.7/Dockerfile index 8ff06287..e7c8d696 100644 --- a/docker/app/alpine/3.7/Dockerfile +++ b/docker/app/alpine/3.7/Dockerfile @@ -2,19 +2,22 @@ FROM python:3.7-alpine ARG EXTRAS=deploy -RUN apk add \ - curl \ +# 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] -COPY . . +# Remove dependencies used for building psycopg2. +RUN apk del --purge build -RUN apk del \ - gcc +COPY . . -HEALTHCHECK CMD curl -I localhost:4000 || exit 1 +HEALTHCHECK CMD curl -I -f localhost:4000 CMD ["gunicorn", "--workers", "4", "--bind", "0.0.0.0:4000", "pysite.wsgi:application"] |