Created
January 23, 2019 16:55
-
-
Save dmulter/a4e965c7a55b8fba9997d6e1a6799458 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine | |
EXPOSE 8080 | |
LABEL "com.datadoghq.ad.logs"='[{"source": "api"}]' | |
# configure environment | |
ENV PYTHONUNBUFFERED 1 | |
# update and install packages | |
RUN apk update --no-cache && \ | |
apk add --no-cache ca-certificates && update-ca-certificates && \ | |
apk add --no-cache -U python3 python3-dev py3-pip && \ | |
apk add --no-cache -U g++ make libffi-dev openssl-dev && \ | |
pip3 install --no-cache-dir --upgrade pip && \ | |
python3 -V && \ | |
pip3 -V | |
# install app requirements | |
COPY requirements.txt /tmp | |
RUN pip3 install --no-cache-dir --extra-index-url https://pypi.dev.uaudio.com/ --trusted-host pypi.dev.uaudio.com -r /tmp/requirements.txt | |
# install app | |
COPY . /app | |
WORKDIR /app | |
# run app | |
CMD ["gunicorn", \ | |
"--config=conf/gunicorn_config.py", \ | |
"--log-level=info", \ | |
"app:create_app()" \ | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment