47 lines
793 B
YAML
47 lines
793 B
YAML
version: '3'
|
|
|
|
services:
|
|
web:
|
|
restart: always
|
|
build: ./web
|
|
expose:
|
|
- "8000"
|
|
links:
|
|
- postgres:postgres
|
|
volumes:
|
|
- web-data:/usr/src/app/static
|
|
env_file:
|
|
- .env
|
|
command: /usr/local/bin/gunicorn -w 2 -b :8000 app:app
|
|
|
|
nginx:
|
|
restart: always
|
|
build: ./nginx
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- .:/www/static
|
|
- web-data:/usr/src/app/static
|
|
links:
|
|
- web:web
|
|
|
|
data:
|
|
image: postgres:latest
|
|
volumes:
|
|
- db-data:/var/lib/postgresql/data
|
|
command: "true"
|
|
|
|
postgres:
|
|
restart: always
|
|
image: postgres:latest
|
|
environment:
|
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
|
volumes:
|
|
- db-data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
|
|
volumes:
|
|
db-data:
|
|
web-data:
|