Skip to content

Instantly share code, notes, and snippets.

@djm
Created October 20, 2014 21:03
Show Gist options
  • Select an option

  • Save djm/9bc44a729f3b8667c88f to your computer and use it in GitHub Desktop.

Select an option

Save djm/9bc44a729f3b8667c88f to your computer and use it in GitHub Desktop.
Simple docker/fig setup for Django
FROM python:2.7
# Force stdin, stdout and stderr to be totally unbuffered.
ENV PYTHONUNBUFFERED 1
# For Pillow to have freetype support.
RUN ln -s /usr/include/freetype2 /usr/include/freetype
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install the app's dependencies.
ADD requirements.txt /usr/src/app/
RUN pip install -r requirements.txt
ADD . /usr/src/app/
RUN python setup.py develop
db:
image: "postgres:latest"
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/usr/src/app
ports:
- "8000:8000"
links:
- db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment