-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (46 loc) · 963 Bytes
/
docker-compose.yml
File metadata and controls
50 lines (46 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# version: '3.8'
services:
web:
build: .
command: /entrypoint.sh
ports:
- "5000:5000"
env_file:
- .env
depends_on:
db:
condition: service_healthy
networks:
- app-network
restart: unless-stopped
environment:
- FLASK_APP=app.py
- FLASK_ENV=production
- PYTHONPATH=/app
- PYTHONUNBUFFERED=1
- PYTHONDONTWRITEBYTECODE=1
- POSTGRES_HOST=db
db:
image: postgres:13
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=user_auth
env_file:
- .env
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- app-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
postgres_data:
driver: local
networks:
app-network:
driver: bridge