36 lines
671 B
YAML
36 lines
671 B
YAML
version: '3'
|
|
services:
|
|
|
|
nginx:
|
|
image: nginx:latest
|
|
restart: on-failure
|
|
container_name: ng01
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./nginx:/etc/nginx/conf.d
|
|
- static-data:/etc/nginx/html
|
|
depends_on:
|
|
- web
|
|
|
|
web:
|
|
build: .
|
|
restart: on-failure
|
|
command: bash -c "python manage.py migrate && gunicorn benchmark.wsgi -b 0.0.0.0:8000"
|
|
volumes:
|
|
- static-data:/code/assets
|
|
depends_on:
|
|
- postgres
|
|
|
|
postgres:
|
|
build: postgres
|
|
restart: on-failure
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
volumes:
|
|
static-data:
|
|
driver: local
|
|
postgres-data:
|
|
driver: local |