41 lines
632 B
YAML
41 lines
632 B
YAML
web:
|
|
restart: always
|
|
build: ./web
|
|
expose:
|
|
- "8000"
|
|
links:
|
|
- postgres:postgres
|
|
volumes:
|
|
- /usr/src/app/static
|
|
environment:
|
|
DB_NAME: brew
|
|
DB_USER: postgres
|
|
DB_PASS: 123456
|
|
SECRET_KEY: secret
|
|
|
|
command: /usr/local/bin/gunicorn -w 2 -b :8000 app:app
|
|
|
|
nginx:
|
|
restart: always
|
|
build: ./nginx/
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- /www/static
|
|
volumes_from:
|
|
- web
|
|
links:
|
|
- web:web
|
|
|
|
postgres:
|
|
restart: always
|
|
image: postgres:latest
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
expose:
|
|
- "5432"
|
|
environment:
|
|
POSTGRES_PASSWORD: 123456
|
|
POSTGRES_USER: postgres
|
|
|