-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (66 loc) · 1.5 KB
/
docker-compose.yml
File metadata and controls
71 lines (66 loc) · 1.5 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: '3.8'
services:
app:
build: .
container_name: app-masterpol-container
restart: unless-stopped
environment:
- DB_HOST=db
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- DB_PORT=5432
- DB_NAME=${DB_NAME}
- LOG_FILE=/app/logs/app.log
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
volumes:
- .:/app:ro
- ./logs:/app/logs
networks:
- app_network
db:
image: postgres:17.5
container_name: db-masterpol-container
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "${DB_USER}", "-d", "${DB_NAME}"]
interval: 5s
timeout: 5s
retries: 5
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- app_network
pgadmin:
image: dpage/pgadmin4:latest
container_name: pgadmin-masterpol-container
restart: unless-stopped
environment:
- PGADMIN_DEFAULT_EMAIL=${ADMIN_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${ADMIN_PASSWORD}
- PGADMIN_CONFIG_SERVER_MODE=False
ports:
- "5050:80"
depends_on:
db:
condition: service_healthy
volumes:
- pgadmin_data:/var/lib/pgadmin
networks:
- app_network
volumes:
postgres_data:
app_logs:
pgadmin_data:
networks:
app_network:
driver: bridge