-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
106 lines (100 loc) · 2.35 KB
/
docker-compose.yaml
File metadata and controls
106 lines (100 loc) · 2.35 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
services:
app:
build:
context: .
target: production
container_name: python_template
env_file:
- .env
ports:
- "8000:8000"
volumes:
- "./src:/app/src:delegated"
depends_on:
db:
condition: service_healthy
restart: unless-stopped
networks:
- python_template-net
db:
image: postgres:17.4-bookworm
container_name: python_template_db
env_file:
- .env
environment:
POSTGRES_DB: ${APP_DB_NAME}
POSTGRES_USER: ${APP_DB_USER}
POSTGRES_PASSWORD: ${APP_DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
networks:
- python_template-net
healthcheck:
test:
[
"CMD",
"pg_isready",
"--username=${APP_DB_USER}",
"--host=localhost",
"--port=5432",
"--dbname=${APP_DB_NAME}",
]
interval: 1s
retries: 5
start_period: 10s
prometheus:
image: prom/prometheus:latest
profiles: [debug, prometheus]
container_name: python_template_prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
ports:
- "9090:9090"
networks:
- python_template-net
grafana:
image: grafana/grafana:latest
profiles: [debug, grafana]
container_name: python_template_grafana
depends_on:
- prometheus
volumes:
- grafana_data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
ports:
- "3001:3000"
networks:
- python_template-net
pgadmin:
image: dpage/pgadmin4
profiles: [debug, pgadmin]
container_name: python_template_pgadmin
restart: always
ports:
- 5050:80
volumes:
- ./pgadmin_servers.json:/pgadmin4/servers.json
- pgadmin_data:/var/lib/pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: admin@pythontemplate.com
PGADMIN_DEFAULT_PASSWORD: pythontemplate_admin
PGADMIN_CONFIG_SERVER_MODE: "False"
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
depends_on:
db:
condition: service_healthy
user: root
networks:
- python_template-net
volumes:
postgres_data:
prometheus_data:
grafana_data:
pgadmin_data:
networks:
python_template-net:
driver: bridge