Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.7'
- services:
- #
- # Consul Worker service
- #
- consul-worker:
- image: consul
- ports:
- - "8500:8500"
- - "8600:8600"
- command: "agent -server -retry-join consul-manager -client 0.0.0.0 -bind '{{ GetInterfaceIP \"eth0\" }}' -advertise '{{ GetInterfaceIP \"eth0\" }}' -ui"
- deploy:
- replicas: 2
- depends_on:
- - consul-manager
- #
- # Consul Manager service
- #
- consul-manager:
- image: consul
- command: "agent -server -bootstrap-expect 3 -client 0.0.0.0 -bind '{{ GetInterfaceIP \"eth0\" }}' -advertise '{{ GetInterfaceIP \"eth0\" }}'"
- deploy:
- replicas: 1
- #
- # Vault
- #
- vault:
- image: vault
- ports:
- - "8200:8200"
- volumes:
- - type: bind
- source: ./config/vault.json
- target: /config/vault.json
- read_only: true
- - type: bind
- source: ./scripts/vault.sh
- target: /scripts/vault.sh
- read_only: true
- command: "sh /scripts/vault.sh"
- deploy:
- replicas: 2
- depends_on:
- - consul-worker
- #
- # Vault UI service
- #
- vault-ui:
- image: 'djenriquez/vault-ui'
- deploy:
- replicas: 1
- environment:
- VAULT_AUTH_DEFAULT: "TOKEN"
- VAULT_URL_DEFAULT: "http://vault:8200"
- ports:
- - "8000:8000"
- depends_on:
- - vault
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement