zkt21/z1/docker-compose.yml

47 lines
789 B
YAML
Raw Permalink Normal View History

2021-04-04 00:17:49 +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:
- "80:80"
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: