-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
191 lines (182 loc) · 4.21 KB
/
Copy pathdocker-compose.yml
File metadata and controls
191 lines (182 loc) · 4.21 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
name: buzz
services:
postgres:
image: postgres:17-alpine
container_name: buzz-postgres
environment:
POSTGRES_USER: buzz
POSTGRES_PASSWORD: buzz_dev
POSTGRES_DB: buzz
PGDATA: /var/lib/postgresql/data
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- buzz-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U buzz"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
deploy:
resources:
limits:
memory: 512m
labels:
com.buzz.service: "postgres"
com.buzz.env: "dev"
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: buzz-redis
ports:
- "6379:6379"
networks:
- buzz-net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
deploy:
resources:
limits:
memory: 128m
labels:
com.buzz.service: "redis"
com.buzz.env: "dev"
restart: unless-stopped
adminer:
image: adminer:latest
container_name: buzz-adminer
ports:
- "8082:8080"
networks:
- buzz-net
depends_on:
postgres:
condition: service_healthy
environment:
ADMINER_DEFAULT_SERVER: postgres
deploy:
resources:
limits:
memory: 64m
labels:
com.buzz.service: "adminer"
com.buzz.env: "dev"
restart: unless-stopped
keycloak:
image: quay.io/keycloak/keycloak:26.0
container_name: buzz-keycloak
command: start-dev --http-port=8080
environment:
KC_DB: dev-mem
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
ports:
- "8180:8080"
networks:
- buzz-net
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/8080 && echo -e 'GET /health/ready HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3 | grep -q '200 OK'"]
interval: 10s
timeout: 5s
retries: 15
start_period: 30s
deploy:
resources:
limits:
memory: 512m
labels:
com.buzz.service: "keycloak"
com.buzz.env: "dev"
restart: unless-stopped
minio:
image: minio/minio:latest
container_name: buzz-minio
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: buzz_dev
MINIO_ROOT_PASSWORD: buzz_dev_secret
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/data
networks:
- buzz-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
deploy:
resources:
limits:
memory: 256m
labels:
com.buzz.service: "minio"
com.buzz.env: "dev"
restart: unless-stopped
minio-init:
image: minio/mc:latest
container_name: buzz-minio-init
depends_on:
minio:
condition: service_healthy
networks:
- buzz-net
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 buzz_dev buzz_dev_secret &&
mc mb --ignore-existing local/buzz-media &&
mc anonymous set none local/buzz-media
"
labels:
com.buzz.service: "minio-init"
com.buzz.env: "dev"
restart: "no"
prometheus:
image: prom/prometheus:latest
container_name: buzz-prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
networks:
- buzz-net
extra_hosts:
- "host.docker.internal:host-gateway"
deploy:
resources:
limits:
memory: 128m
labels:
com.buzz.service: "prometheus"
com.buzz.env: "dev"
restart: unless-stopped
volumes:
postgres-data:
name: buzz-postgres-data
labels:
com.buzz.volume: "postgres"
minio-data:
name: buzz-minio-data
labels:
com.buzz.volume: "minio"
prometheus-data:
name: buzz-prometheus-data
labels:
com.buzz.volume: "prometheus"
networks:
buzz-net:
name: buzz-net
driver: bridge
labels:
com.buzz.network: "dev"