Created
November 7, 2016 09:57
-
-
Save danielsamuels/3342623b98849fd509ebf764aef347bd to your computer and use it in GitHub Desktop.
Docker files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2" | |
services: | |
postgres: | |
image: postgres:9.4.5 | |
ports: | |
- "5432:5432" | |
environment: | |
POSTGRES_DB: projectname | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
web: | |
build: . | |
links: | |
- postgres | |
volumes: | |
- .:/var/www/projectname | |
ports: | |
- "8000:8000" | |
environment: | |
DJANGO_SETTINGS_MODULE: projectname.settings.local | |
DJANGO_DATABASE_NAME: projectname | |
DJANGO_DATABASE_HOST: projectname_postgres_1 | |
DJANGO_DATABASE_PORT: 5432 | |
DJANGO_DATABASE_PASSWORD: postgres | |
DJANGO_DATABASE_USER: postgres | |
command: bash -c "sleep 10 && python manage.py runserver 0.0.0.0:8000"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:2.7 | |
ENV PYTHONUNBUFFERED 1 | |
RUN mkdir /var/www/ | |
RUN mkdir /var/www/project | |
WORKDIR /var/www/project | |
ADD requirements.txt /var/www/project | |
RUN pip install -r requirements.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment