Advertisement
Guest User

Untitled

a guest
Sep 20th, 2018
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.32 KB | None | 0 0
  1. version: '3.7'
  2. services:
  3.  #
  4.   # Consul Worker service
  5.   #
  6.   consul-worker:
  7.     image: consul
  8.     ports:
  9.      - "8500:8500"
  10.       - "8600:8600"
  11.     command: "agent -server -retry-join consul-manager -client 0.0.0.0 -bind '{{ GetInterfaceIP \"eth0\" }}' -advertise '{{ GetInterfaceIP \"eth0\" }}' -ui"
  12.     deploy:
  13.       replicas: 2
  14.     depends_on:
  15.      - consul-manager
  16.   #
  17.   # Consul Manager service
  18.   #
  19.   consul-manager:
  20.     image: consul
  21.     command: "agent -server -bootstrap-expect 3 -client 0.0.0.0 -bind '{{ GetInterfaceIP \"eth0\" }}' -advertise '{{ GetInterfaceIP \"eth0\" }}'"
  22.     deploy:
  23.       replicas: 1
  24.   #
  25.   # Vault
  26.   #
  27.   vault:
  28.     image: vault
  29.     ports:
  30.      - "8200:8200"
  31.     volumes:
  32.       - type: bind
  33.         source: ./config/vault.json
  34.         target: /config/vault.json
  35.         read_only: true
  36.       - type: bind
  37.         source: ./scripts/vault.sh
  38.         target: /scripts/vault.sh
  39.         read_only: true
  40.     command: "sh /scripts/vault.sh"
  41.     deploy:
  42.       replicas: 2
  43.     depends_on:
  44.      - consul-worker
  45.   #
  46.   # Vault UI service
  47.   #
  48.   vault-ui:
  49.     image: 'djenriquez/vault-ui'
  50.     deploy:
  51.       replicas: 1
  52.     environment:
  53.       VAULT_AUTH_DEFAULT: "TOKEN"
  54.       VAULT_URL_DEFAULT: "http://vault:8200"
  55.     ports:
  56.      - "8000:8000"
  57.     depends_on:
  58.      - vault
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement