Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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