-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose-app-version-two.yml
41 lines (38 loc) · 1.48 KB
/
docker-compose-app-version-two.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
version: '3'
services:
myapplication_behind_envoy_v2:
image: tak2siva/tiny-mock-server
environment:
PORT: 8123
CONTENT: 'this is app --TWO NEW-- via envoy'
CODE: 200
networks:
- myapplication_xds-application
deploy:
replicas: 2
update_config:
delay: 60s
parallelism: 1
consul-import:
image: consul:latest
restart: on-failure
networks:
- infra_xds-infra
volumes:
- $PWD/config/canary/cluster-config.json:/cluster-config.json
- $PWD/config/canary/cluster-version.json:/cluster-version.json
- $PWD/config/canary/listener-config.json:/listener-config.json
- $PWD/config/canary/listener-version.json:/listener-version.json
- $PWD/wait-for-command.sh:/scripts/wait-for-command.sh
command: >
sh -c 'chmod +x /scripts/wait-for-command.sh; sh /scripts/wait-for-command.sh -t 30 -c "curl -f http://consul-server-bootstrap:8500/v1/status/leader"
&& export CONSUL_HTTP_ADDR=consul-server-bootstrap:8500
&& consul kv put xDS/app-cluster/myapplication-cluster/CDS/config @cluster-config.json
&& consul kv put xDS/app-cluster/myapplication-cluster/CDS/version @cluster-version.json
&& consul kv put xDS/app-cluster/myapplication-cluster/LDS/config @listener-config.json
&& consul kv put xDS/app-cluster/myapplication-cluster/LDS/version @listener-version.json'
networks:
infra_xds-infra:
external: true
myapplication_xds-application:
external: true