Skip to content

Instantly share code, notes, and snippets.

@IlianIliev
Created June 11, 2017 15:26
Show Gist options
  • Save IlianIliev/0822de2b05a28c86bbecaeb7a26f8294 to your computer and use it in GitHub Desktop.
Save IlianIliev/0822de2b05a28c86bbecaeb7a26f8294 to your computer and use it in GitHub Desktop.
# Dockerfile
FROM python:3.5
ENV PYTHONUNBUFFERED 1
ADD . /<project>
WORKDIR /<project>
RUN pip install -r requirements.txt
# docker-compose.yml
version: '3'
services:
db:
container_name: <project>-db
image: postgres
api:
container_name: <project>-api
build: ./<project>
environment:
- DJANGO_SETTINGS_MODULE=<project>.settings.develop
volumes:
- ./<project>:/<project>
command: python manage.py runserver 0.0.0.0:8001
ports:
- "8001:8001"
depends_on:
- db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment