-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
29 lines (20 loc) · 842 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.8
LABEL maintainer="[email protected]"
ENV POETRY_VERSION=1.0.0 \
APP_DIR=/usr/src/app \
APP_PORT=5000 \
PATH="/root/.poetry/bin:$PATH"
RUN mkdir -p ${APP_DIR}
# The WORKDIR instruction sets the working directory for any RUN, CMD,
# ENTRYPOINT, COPY and ADD instructions that follow it in the Dockerfile.
WORKDIR ${APP_DIR}
# Install and config Poetry
RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/${POETRY_VERSION}/get-poetry.py | python && \
poetry config virtualenvs.create false
# Copy only requirements, to cache them in Docker layer.
COPY pyproject.toml poetry.lock ${APP_DIR}/
RUN poetry install
COPY assets/* ${APP_DIR}/assets/
COPY dash_fda/* assets ${APP_DIR}/dash_fda/
EXPOSE ${APP_PORT}
CMD gunicorn --bind 0.0.0.0:${APP_PORT} --access-logfile - "dash_fda.app:server"