workout/Dockerfile

29 lines
730 B
Text
Raw Permalink Normal View History

2018-06-20 00:52:54 +02:00
FROM python:3.6-alpine
2018-03-04 10:15:42 +01:00
2018-08-15 11:15:25 +02:00
RUN apk add --update postgresql-libs git && \
2018-06-20 00:52:54 +02:00
apk add --udpate --virtual .build-deps gcc musl-dev postgresql-dev tzdata && \
cp /usr/share/zoneinfo/Europe/Paris /etc/localtime && \
echo "Europe/Paris" > /etc/timezone
2018-03-04 10:15:42 +01:00
WORKDIR /app
EXPOSE 8000
VOLUME /app/staticfiles
RUN pip3 install pipenv
COPY Pipfile Pipfile.lock ./
2018-08-15 11:15:25 +02:00
RUN pipenv install && apk del .build-deps
2018-06-20 00:52:54 +02:00
2018-03-04 10:15:42 +01:00
COPY . ./
2018-06-20 00:52:54 +02:00
CMD ["sh", "bash/run-prod.sh"]
HEALTHCHECK --interval=10s --timeout=10s CMD ["pipenv", "run", "python", "healthcheck.py"]
2018-03-31 17:19:56 +02:00
ENV DATABASE_URL postgres://postgresql:postgresql@db:5432/workout
2018-03-31 17:19:56 +02:00
ENV SECRET_KEY ''
ENV MAILGUN_ACCESS_KEY ''
ENV MAILGUN_SERVER_NAME ''
ENV DJANGO_ENV ''
ENV ADMIN_EMAIL ''
ENV SERVER_EMAIL ''