Permalink
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (50 sloc) 1.05 KB
web:
restart: always
build: .
expose:
- "8000"
links:
- postgres:postgres
- memcached:memcached
env_file: ./contrib/django/.env
ports:
- "8000:8000"
volumes:
- /var/lib/leonardo/static
- /var/lib/leonardo/media
command: >
bash -c "python /usr/lib/leonardo/myproject/manage.py makemigrations &&
python /usr/lib/leonardo/myproject/manage.py migrate --noinput &&
python /usr/lib/leonardo/myproject/manage.py sync_all -f &&
gunicorn leonardo_site.wsgi:application -w 2 -b :8000"
nginx:
restart: always
build: ./contrib/nginx
ports:
- "80:80"
volumes:
- /var/lib/leonardo/static
- /var/lib/leonardo/media
volumes_from:
- web
links:
- web:web
postgres:
restart: always
image: postgres:latest
env_file: ./contrib/django/.env
volumes_from:
- data
ports:
- "5432:5432"
memcached:
image: memcached
ports:
- "11211:11211"
data:
env_file: ./contrib/django/.env
restart: always
image: postgres:latest
volumes:
- /var/lib/postgresql
command: "true"