Skip to content

Instantly share code, notes, and snippets.

@mushfiq
Created March 6, 2016 18:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mushfiq/3dccc61f3171ffa670ec to your computer and use it in GitHub Desktop.
Save mushfiq/3dccc61f3171ffa670ec to your computer and use it in GitHub Desktop.
Docker file for running DRF based µ-service.
FROM python:2.7
MAINTAINER Mushfiq
ENV PYTHONUNBUFFERED 1
RUN git clone https://github.com/mushfiq/djmsc.git djmsc
WORKDIR djmsc
RUN pip install -r requirements.txt
RUN python manage.py migrate
RUN python manage.py loaddata data/dummped.json
CMD ["uwsgi", "--module=djmsc.wsgi:application", "--env=DJANGO_SETTINGS_MODULE=djmsc.settings", "--master", "--pidfile=/tmp/djmsc.pid", "--http=0.0.0.0:8000", "--socket=0.0.0.0:8001", "--buffer-size=32768"]
EXPOSE 8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment