-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
60 lines (55 loc) · 1.52 KB
/
docker-compose.yaml
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
version: '3.7'
services:
mock:
build:
context: .
args:
_HTTPS_MODE: "false"
_MOCK_REFERENCE: ${MOCK_REFERENCE}
image: ${MOCK_REFERENCE}:${MOCK_VERSION}
container_name: ${MOCK_REFERENCE}
volumes:
- ./state.json:/state.json
ports:
- "8080:8080"
- "2000:2000"
healthcheck:
test: "curl --fail http://localhost:8080/health || exit 1"
interval: 60s
retries: 5
start_period: 2s
timeout: 2s
networks:
- mock-nw
ngrok_host:
image: wernight/ngrok
container_name: ngrok_host
depends_on:
mock:
condition: service_healthy
ports:
- "4040:4040"
command: ngrok http mock:8080
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4040"]
interval: 60s
retries: 5
start_period: 2s
timeout: 2s
networks:
- mock-nw
- ngrok_host-nw
ngrok_mock:
image: dwdraju/alpine-curl-jq
container_name: ngrok_mock
depends_on:
ngrok_host:
condition: service_healthy
command: sh -c "curl -s http://ngrok_host:4040/api/tunnels | jq '.tunnels[0].public_url'"
networks:
- ngrok_host-nw
networks:
mock-nw:
name: mock-nw
ngrok_host-nw:
name: ngrok_host-nw