Skip to content

Instantly share code, notes, and snippets.

@dmulter
Created January 23, 2019 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmulter/a4e965c7a55b8fba9997d6e1a6799458 to your computer and use it in GitHub Desktop.
Save dmulter/a4e965c7a55b8fba9997d6e1a6799458 to your computer and use it in GitHub Desktop.
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