-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose-init.yml
More file actions
38 lines (33 loc) · 845 Bytes
/
docker-compose-init.yml
File metadata and controls
38 lines (33 loc) · 845 Bytes
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
version: "2"
services:
consul_init:
image: consul
command: |
sh -c 'set -uex; \
consul kv put -http-addr=http://172.16.231.22:8500 config/init true'
volumes:
- './basic_config.json:/consul/config/basic_config.json'
networks:
- consul_test
set:
image: consul
entrypoint: consul kv put -http-addr=http://172.16.231.22:8500
volumes:
- './basic_config.json:/consul/config/basic_config.json'
networks:
- consul_test
get:
image: consul
entrypoint: consul kv get -http-addr=http://172.16.231.22:8500
volumes:
- './basic_config.json:/consul/config/basic_config.json'
networks:
- consul_test
networks:
consul_test:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.231.0/24
gateway: 172.16.231.1