zkt21/z2/docker-compose.yml

47 lines
793 B
YAML
Raw Permalink Normal View History

2021-04-18 11:21:46 +00:00
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: