-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (26 loc) · 914 Bytes
/
Dockerfile
File metadata and controls
35 lines (26 loc) · 914 Bytes
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
33
34
35
FROM python:3.7-slim
# Install build dependencies
# RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev
# RUN apk add --virtual=build gcc libffi-dev musl-dev openssl-dev make cmake g++
# RUN apk add jpeg-dev zlib-dev
RUN apt-get update && apt-get -y install gcc libpq-dev
# ENV LIBRARY_PATH=/lib:/usr/lib
# Install dependencies
COPY requirements.txt ./
RUN pip install -r requirements.txt
# Copy local code to the container image.
ENV APP_HOME /app
WORKDIR $APP_HOME
COPY . ./
ARG GIT_BRANCH=unspecified
LABEL git_branch=$GIT_BRANCH
ENV GIT_BRANCH=$GIT_BRANCH
ARG GIT_COMMIT=unspecified
LABEL git_commit=$GIT_COMMIT
ENV GIT_COMMIT=$GIT_COMMIT
ARG VERSION=unspecified
LABEL version=$VERSION
ENV VERSION=$VERSION
EXPOSE 8080
ENV FLASK_APP=main.py:app
CMD exec gunicorn --statsd-host=localhost:9125 --statsd-prefix=label-storage --bind :8080 --workers 2 --threads 4 --config config.py wsgi:app