-
Notifications
You must be signed in to change notification settings - Fork 368
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
209 lines (191 loc) · 4.79 KB
/
docker-compose.yml
File metadata and controls
209 lines (191 loc) · 4.79 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
version: "3.3"
# Profiles:
# (default) - uaa, nginx only (for local DB via brew)
# dev - + postgres, mysql (typical development)
# broker - + catsbroker
# s3 - + seaweedfs (S3-compatible blobstore)
# diego - + diego-api, mockserver, loggregator-metron
# full - all services
#
# Usage:
# docker compose --profile dev up -d # Typical dev (DBs + uaa + nginx)
# docker compose up -d # Local DBs via brew (just uaa + nginx)
# docker compose --profile full up -d # All services
services:
# === Default (always started) ===
uaa:
container_name: uaa
build:
context: .devcontainer/images/uaa
dockerfile: Dockerfile
ports:
- "127.0.0.1:8080:8080"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/info" ]
interval: 30s
timeout: 20s
retries: 3
networks:
- cc-net
restart: unless-stopped
nginx:
container_name: nginx
build:
context: .devcontainer/images/nginx
dockerfile: Dockerfile
args:
ENABLED_MODULES: nginx_upload_module
ports:
- "0.0.0.0:80:80"
networks:
- cc-net
volumes:
- .devcontainer/images/nginx/conf:/usr/local/nginx/conf:ro
- ./tmp:/tmp
cap_add:
- NET_BIND_SERVICE
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
# === DB Profile ===
postgres:
container_name: postgres
image: postgres:16-alpine
environment:
POSTGRES_PASSWORD: supersecret
ports:
- "127.0.0.1:5432:5432"
networks:
- cc-net
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
profiles:
- dev
- full
mysql:
container_name: mysql
image: mysql:8.2
environment:
MYSQL_ROOT_PASSWORD: supersecret
ports:
- "127.0.0.1:3306:3306"
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 10s
timeout: 20s
retries: 3
networks:
- cc-net
restart: unless-stopped
profiles:
- dev
- full
# === Broker Profile ===
catsbroker:
container_name: catsbroker
build:
context: .devcontainer/images/catsbroker
dockerfile: Dockerfile
ports:
- "127.0.0.1:9292:9292"
- "127.0.0.1:9393:80"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9292/v2/catalog" ]
interval: 30s
timeout: 20s
retries: 3
networks:
- cc-net
restart: unless-stopped
profiles:
- broker
- full
# === S3 Profile ===
seaweedfs:
container_name: seaweedfs
image: chrislusf/seaweedfs:latest
command: 'server -s3 -dir=/data -s3.port=8333 -s3.allowEmptyFolder=true -s3.config=/etc/seaweedfs/s3.json'
ports:
- "127.0.0.1:8333:8333"
- "127.0.0.1:9333:9333"
volumes:
- seaweedfs-data:/data
- .devcontainer/images/seaweedfs:/etc/seaweedfs:ro
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:9333/cluster/status"]
interval: 30s
timeout: 10s
retries: 3
networks:
- cc-net
restart: unless-stopped
profiles:
- s3
- full
# === Diego Profile ===
diego-api:
container_name: diego-api
build:
context: .devcontainer/images/bbs
dockerfile: Dockerfile
volumes:
- .devcontainer/images/bbs/bbs.json:/bbs/bbs.json:ro
- .devcontainer/images/bbs/locket.json:/bbs/locket.json:ro
- ./spec/fixtures/certs:/bbs/certs:ro
ports:
- "8889:8889"
depends_on:
- loggregator-metron
networks:
- cc-net
restart: unless-stopped
profiles:
- diego
- full
mockserver:
container_name: mockserver
build:
context: .devcontainer/images/mockserver
dockerfile: Dockerfile
ports:
- "1234:1234"
environment:
DIEGO_URL: https://diego-api:8889/
DIEGO_CA: /mock/certs/bbs_ca.crt
DIEGO_CLIENT_CERT: /mock/certs/bbs_client.crt
DIEGO_CLIENT_KEY: /mock/certs/bbs_client.key
volumes:
- ./spec/fixtures/certs:/mock/certs:ro
networks:
- cc-net
restart: unless-stopped
profiles:
- diego
- full
loggregator-metron:
container_name: loggregator-metron
build:
context: .devcontainer/images/loggregator-metron
dockerfile: Dockerfile
ports:
- "127.0.0.1:3456:3456"
environment:
METRON_CERT: /metron/certs/metron.crt
METRON_KEY: /metron/certs/metron.key
METRON_CA: /metron/certs/metron_ca.crt
volumes:
- ./spec/fixtures/certs:/metron/certs:ro
networks:
- cc-net
restart: unless-stopped
profiles:
- diego
- full
networks:
cc-net:
volumes:
seaweedfs-data: