Skip to content

Instantly share code, notes, and snippets.

@jeffknupp
Created December 15, 2016 23:23
Show Gist options
  • Save jeffknupp/ad7202703e49244aca0ef84fa17fdad8 to your computer and use it in GitHub Desktop.
Save jeffknupp/ad7202703e49244aca0ef84fa17fdad8 to your computer and use it in GitHub Desktop.
FROM ubuntu:16.04
MAINTAINER Jeff Knupp <jeff.knupp@enigma.io>
RUN apt-get update && \
apt-get install -y python3 \
python3-psycopg2 \
python3-pip \
uwsgi \
uwsgi-plugin-python3
WORKDIR /opt/api
COPY requirements.txt /opt/api/
RUN pip3 install -r requirements.txt
ENV PYTHONPATH "/opt/api:$PYTHONPATH"
COPY api/ api/
COPY config/ config/
COPY scripts/ scripts/
COPY app.py .
COPY deploy/api.ini .
COPY deploy/uwsgi.conf /etc/init/uwsgi.conf
CMD ["uwsgi", "--ini", "/opt/api/api.ini", "--plugin", "python3"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment