Skip to content

Commit ec95239

Browse files
committed
move services to single port
1 parent 9e2c5a3 commit ec95239

File tree

3 files changed

+355
-46
lines changed

3 files changed

+355
-46
lines changed

Caddyfile

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
http://localhost
2+
3+
route /core/* {
4+
uri strip_prefix /core
5+
reverse_proxy core:4200
6+
}
7+
8+
route /alerts/* {
9+
uri strip_prefix /alerts
10+
reverse_proxy alerts:4200
11+
}
12+
13+
route /alert_rules/* {
14+
uri strip_prefix /alert_rules
15+
reverse_proxy alert_rules:4200
16+
}
17+
18+
route /detection_lists/* {
19+
uri strip_prefix /detection_lists
20+
reverse_proxy detection_lists:4200
21+
}
22+
23+
route /cases/* {
24+
uri strip_prefix /cases
25+
reverse_proxy cases:4200
26+
}
27+
28+
route /storage/* {
29+
uri strip_prefix /storage
30+
reverse_proxy storage:4200
31+
}
32+
33+
route /connected_server/* {
34+
uri strip_prefix /connected_server
35+
reverse_proxy connected_server:4200
36+
}
37+
38+
route /audit_log/* {
39+
uri strip_prefix /audit_log
40+
reverse_proxy audit_log:4200
41+
}
42+
43+
route /file_events/* {
44+
uri strip_prefix /file_events
45+
reverse_proxy file_events:4200
46+
}
47+
48+
route /preservation_data_service/* {
49+
uri strip_prefix /preservation_data_service
50+
reverse_proxy preservation_data_service:4200
51+
}
52+
53+
route /exfiltration_data_service/* {
54+
uri strip_prefix /exfiltration_data_service
55+
reverse_proxy exfiltration_data_service:4200
56+
}
57+
58+
route /trusted_activities/* {
59+
uri strip_prefix /trusted_activities
60+
reverse_proxy trusted_activities:4200
61+
}

docker-compose-old.yml

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,252 @@
1+
version: '2.4'
2+
services:
3+
4+
core:
5+
image: c42/mock-microservice-endpoints:1.0
6+
build:
7+
context: .
8+
dockerfile: Dockerfile
9+
container_name: mock_core
10+
restart: always
11+
ports:
12+
- "4200:4200"
13+
command: mock docs/core.yml -p 4200 -h 0.0.0.0
14+
healthcheck:
15+
test: ["CMD-SHELL", "curl -f http://core:4200 || exit 1"]
16+
interval: 30s
17+
timeout: 15s
18+
retries: 3
19+
networks:
20+
- api-integration-test-network
21+
22+
alerts:
23+
image: c42/mock-microservice-endpoints:1.0
24+
build:
25+
context: .
26+
dockerfile: Dockerfile
27+
container_name: mock_alerts
28+
restart: always
29+
ports:
30+
- "4201:4201"
31+
command: mock docs/alerts.yml -p 4201 -h 0.0.0.0
32+
healthcheck:
33+
test: ["CMD-SHELL", "curl -f http://alerts:4201 || exit 1"]
34+
interval: 30s
35+
timeout: 15s
36+
retries: 3
37+
networks:
38+
- api-integration-test-network
39+
40+
alert-rules:
41+
image: c42/mock-microservice-endpoints:1.0
42+
build:
43+
context: .
44+
dockerfile: Dockerfile
45+
container_name: mock_alert_rules
46+
restart: always
47+
ports:
48+
- "4202:4202"
49+
command: mock docs/alert-rules.yml -p 4202 -h 0.0.0.0
50+
healthcheck:
51+
test: ["CMD-SHELL", "curl -f http://alert-rules:4202 || exit 1"]
52+
interval: 30s
53+
timeout: 15s
54+
retries: 3
55+
networks:
56+
- api-integration-test-network
57+
58+
detection-lists:
59+
image: c42/mock-microservice-endpoints:1.0
60+
build:
61+
context: .
62+
dockerfile: Dockerfile
63+
container_name: mock_detection_lists
64+
restart: always
65+
ports:
66+
- "4203:4203"
67+
command: mock docs/detection-lists.yml -p 4203 -h 0.0.0.0
68+
healthcheck:
69+
test: ["CMD-SHELL", "curl -f http://detection-lists:4203 || exit 1"]
70+
interval: 30s
71+
timeout: 15s
72+
retries: 3
73+
networks:
74+
- api-integration-test-network
75+
76+
cases:
77+
image: c42/mock-microservice-endpoints:1.0
78+
build:
79+
context: .
80+
dockerfile: Dockerfile
81+
container_name: mock_cases
82+
restart: always
83+
ports:
84+
- "4204:4204"
85+
command: mock docs/cases.yml -p 4204 -h 0.0.0.0
86+
healthcheck:
87+
test: ["CMD-SHELL", "curl -f http://cases:4204 || exit 1"]
88+
interval: 30s
89+
timeout: 15s
90+
retries: 3
91+
networks:
92+
- api-integration-test-network
93+
94+
storage:
95+
image: c42/mock-microservice-endpoints:1.0
96+
build:
97+
context: .
98+
dockerfile: Dockerfile
99+
container_name: mock_storage
100+
restart: always
101+
ports:
102+
- "4205:4205"
103+
command: mock docs/storage.yml -p 4205 -h 0.0.0.0
104+
healthcheck:
105+
test: ["CMD-SHELL", "curl -f http://storage:4205 || exit 1"]
106+
interval: 30s
107+
timeout: 15s
108+
retries: 3
109+
networks:
110+
- api-integration-test-network
111+
112+
connected-server:
113+
image: c42/mock-microservice-endpoints:1.0
114+
build:
115+
context: .
116+
dockerfile: Dockerfile
117+
container_name: mock_connected_server
118+
restart: always
119+
ports:
120+
- "4206:4206"
121+
command: mock docs/connected-server.yml -p 4206 -h 0.0.0.0
122+
healthcheck:
123+
test: ["CMD-SHELL", "curl -f http://connected-server:4206 || exit 1"]
124+
interval: 30s
125+
timeout: 15s
126+
retries: 3
127+
networks:
128+
- api-integration-test-network
129+
130+
audit-log:
131+
image: c42/mock-microservice-endpoints:1.0
132+
build:
133+
context: .
134+
dockerfile: Dockerfile
135+
container_name: mock_audit_log
136+
restart: always
137+
ports:
138+
- "4207:4207"
139+
command: mock docs/audit-log.yml -p 4207 -h 0.0.0.0
140+
healthcheck:
141+
test: ["CMD-SHELL", "curl -f http://audit-log:4207 || exit 1"]
142+
interval: 30s
143+
timeout: 15s
144+
retries: 3
145+
networks:
146+
- api-integration-test-network
147+
148+
file-events:
149+
image: c42/mock-microservice-endpoints:1.0
150+
build:
151+
context: .
152+
dockerfile: Dockerfile
153+
container_name: mock_file_events
154+
restart: always
155+
ports:
156+
- "4208:4208"
157+
command: mock docs/file-events.yml -p 4208 -h 0.0.0.0
158+
healthcheck:
159+
test: ["CMD-SHELL", "curl -f http://file-events:4208 || exit 1"]
160+
interval: 30s
161+
timeout: 15s
162+
retries: 3
163+
networks:
164+
- api-integration-test-network
165+
166+
preservation-data-service:
167+
image: c42/mock-microservice-endpoints:1.0
168+
build:
169+
context: .
170+
dockerfile: Dockerfile
171+
container_name: mock_preservation_data_service
172+
restart: always
173+
ports:
174+
- "4209:4209"
175+
command: mock docs/preservation-data-service.yml -p 4209 -h 0.0.0.0
176+
healthcheck:
177+
test: ["CMD-SHELL", "curl -f http://preservation-data-service:4209 || exit 1"]
178+
interval: 30s
179+
timeout: 15s
180+
retries: 3
181+
networks:
182+
- api-integration-test-network
183+
184+
exfiltration-data-service:
185+
image: c42/mock-microservice-endpoints:1.0
186+
build:
187+
context: .
188+
dockerfile: Dockerfile
189+
container_name: mock_exfiltration_data_service
190+
restart: always
191+
ports:
192+
- "4210:4210"
193+
command: mock docs/exfiltration-data-service.yml -p 4210 -h 0.0.0.0
194+
healthcheck:
195+
test: ["CMD-SHELL", "curl -f http://exfiltration-data-service:4210 || exit 1"]
196+
interval: 30s
197+
timeout: 15s
198+
retries: 3
199+
networks:
200+
- api-integration-test-network
201+
202+
trusted-activities:
203+
image: c42/mock-microservice-endpoints:1.0
204+
build:
205+
context: .
206+
dockerfile: Dockerfile
207+
container_name: mock_trusted_activities
208+
restart: always
209+
ports:
210+
- "4211:4211"
211+
command: mock docs/trusted-activities.yml -p 4211 -h 0.0.0.0
212+
healthcheck:
213+
test: ["CMD-SHELL", "curl -f http://trusted-activities:4211 || exit 1"]
214+
interval: 30s
215+
timeout: 15s
216+
retries: 3
217+
networks:
218+
- api-integration-test-network
219+
220+
221+
health_checker:
222+
image: c42/mock-microservice-endpoints:1.0
223+
entrypoint: ["echo", "All mock server containers are responding to requests!"]
224+
container_name: "health_checker"
225+
depends_on:
226+
core:
227+
condition: service_healthy
228+
alerts:
229+
condition: service_healthy
230+
alert-rules:
231+
condition: service_healthy
232+
detection-lists:
233+
condition: service_healthy
234+
cases:
235+
condition: service_healthy
236+
storage:
237+
condition: service_healthy
238+
connected-server:
239+
condition: service_healthy
240+
audit-log:
241+
condition: service_healthy
242+
file-events:
243+
condition: service_healthy
244+
preservation-data-service:
245+
condition: service_healthy
246+
exfiltration-data-service:
247+
condition: service_healthy
248+
trusted-activities:
249+
condition: service_healthy
250+
251+
networks:
252+
api-integration-test-network:

0 commit comments

Comments
 (0)