-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
23 lines (23 loc) · 1.02 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Production image. Runs a Gunicorn WSGI server.
FROM minio/mc:RELEASE.2022-06-17T02-52-50Z AS mc
FROM python:3.9-slim
ARG GIT_SHA
LABEL org.opencontainers.image.title Stager production
LABEL org.opencontainers.image.authors https://ccm.sickkids.ca/
LABEL org.opencontainers.image.source https://github.com/ccmbioinfo/stager
LABEL org.opencontainers.image.vendor Centre for Computational Medicine
LABEL org.opencontainers.image.revision ${GIT_SHA}
ENV GIT_SHA=${GIT_SHA}
WORKDIR /usr/src/stager
# Install PyPI prod-only packages first and then copy the MinIO client as the latter updates more frequently
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
COPY --from=mc /usr/bin/mc /usr/bin/mc
COPY . .
ENV FLASK_ENV production
ENV TZ America/Toronto
ENV PROMETHEUS_MULTIPROC_DIR /tmp
EXPOSE 5000 8080
# Prevent accidentally using this image for development by adding the prod server arguments in the entrypoint
# Automatically run migrations on startup
ENTRYPOINT ["./utils/run.sh", "prod", "--bind", "0.0.0.0:5000"]