Skip to content

Instantly share code, notes, and snippets.

@phpdude
Created March 9, 2016 15:27
Show Gist options
  • Save phpdude/5d0c39d3bcf316affe42 to your computer and use it in GitHub Desktop.
Save phpdude/5d0c39d3bcf316affe42 to your computer and use it in GitHub Desktop.
Docker Composer Django \w NGINX \w uWSG \w PostgreSQL In Production
version: '2'
services:
db:
restart: always
image: postgres
environment:
- POSTGRES_USER=project
- POSTGRES_PASSWORD=project
volumes:
- ./db/postgres:/var/lib/postgresql/data
cache:
restart: always
image: redis
manage:
image: phpdude/project:app
environment:
- PRODUCTION=1
entrypoint: python manage.py
volumes:
- ./logs/:/app/logs/
web:
restart: always
extends:
service: manage
entrypoint: bash /app/production/web/service.web.sh
links:
- db
- cache
nginx:
restart: always
image: phpdude/project:app
entrypoint: ["nginx", "-g", "daemon off;"]
volumes:
- ./media/:/app/media/
- ./logs/nginx/:/var/log/nginx/
ports:
- 80:80
links:
- web
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment