-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.prod.yml
100 lines (94 loc) · 2.64 KB
/
compose.prod.yml
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
services:
zexd:
image: avaterclasher/zexd-backend:v1
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
dragonflydb:
condition: service_healthy
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_USER: zexd
DB_PASSWORD: zexd
DB_NAME: zexd_db
DB_SSL: disable
TABLE_NAME: shortened_url
EXPIRY_TIME: 1440
REDIS_DOMAIN: redis://user@dragonflydb:6379/
SERVER_DOMAIN: http://localhost:8080/
networks:
- app-network
- monitoring
postgres:
image: postgres:16-alpine
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=zexd
- POSTGRES_USER=zexd
- POSTGRES_DB=zexd_db
networks:
- app-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -d zexd_db"]
interval: 3s
timeout: 3s
retries: 3
dragonflydb:
image: docker.dragonflydb.io/dragonflydb/dragonfly
ulimits:
memlock: -1
ports:
- "6379:6379"
networks:
- app-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
timeout: 3s
retries: 3
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
- "--web.console.templates=/usr/share/prometheus/consoles"
networks:
- app-network
- monitoring
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
volumes:
- grafana_data:/var/lib/grafana
depends_on:
- prometheus
networks:
- monitoring
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_SECURITY_ADMIN_USER=admin
- GF_USERS_ALLOW_SIGN_UP=false
networks:
app-network:
driver: bridge
monitoring:
driver: bridge
volumes:
prometheus_data:
grafana_data:
postgres_data: