Skip to content

Instantly share code, notes, and snippets.

@tombasche
Last active September 23, 2018 22:42
Show Gist options
  • Save tombasche/bed41de25d4c91fadbc6daf518e56b3a to your computer and use it in GitHub Desktop.
Save tombasche/bed41de25d4c91fadbc6daf518e56b3a to your computer and use it in GitHub Desktop.
FROM alpine:latest
RUN apk add --update \
python3 \
python3-dev \
python-dev \
py-pip \
build-base \
bash \
py3-psycopg2 \
gcc musl-dev postgresql-dev \
&& pip install virtualenv \
&& rm -rf /var/cache/apk/*
COPY requirements.txt /app/requirements.txt
COPY setup.py /app/setup.py
WORKDIR /app
# add the app to pythonpath
RUN echo "export PYTHONPATH=\"/usr/lib/python3.6\"; export PYTHONPATH=\"\${PYTHONPATH}:/app\"" > /etc/profile.d/pypath.sh
RUN pip3 install setuptools --upgrade
RUN pip3 install -r requirements.txt --ignore-installed
COPY moovies /app/moovies
COPY moovies_tests /app/moovies_tests
EXPOSE 8000
CMD ["/usr/bin/gunicorn", "moovies_tests.moovies.wsgi", "-b", "0.0.0.0:8000", "--workers", "2"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment