-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (23 loc) · 809 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
30
31
32
FROM python:3.8.3-slim-buster as app
LABEL maintainer="Rijan adhikari <[email protected]>"
WORKDIR /app
COPY Pipfile Pipfile
ENV BUILD_DEPS="build-essential" \
APP_DEPS="curl libpq-dev"
RUN apt-get update \
&& apt-get install -y ${BUILD_DEPS} ${APP_DEPS} --no-install-recommends \
&& pip3 install pipenv \
&& pipenv install \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/share/doc && rm -rf /usr/share/man \
&& apt-get purge -y --auto-remove ${BUILD_DEPS} \
&& apt-get clean
ARG FLASK_ENV="production"
ENV FLASK_ENV="${FLASK_ENV}" \
FLASK_APP="src.app" \
PYTHONUNBUFFERED="true"
COPY . .
RUN chmod +x docker-entrypoint.sh
ENTRYPOINT ["/app/docker-entrypoint.sh"]
EXPOSE 8000
CMD ["pipenv", "run", "gunicorn", "-c", "python:config.gunicorn", "src.app:create_app()"]