-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
74 lines (67 loc) · 1.84 KB
/
docker-compose.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: "3.6"
services:
nginx:
build: .
environment:
CT_LOCAL_CONFIG: >-
consul {
address = "vault_consul_1:8500"
retry {
enabled = true
attempts = 12
backoff = "250ms"
}
}
reload_signal = "SIGHUP"
kill_signal = "SIGINT"
max_stale = "10m"
log_level = "warn"
pid_file = "/consul-template/consul-template.pid"
wait {
min = "5s"
max = "10s"
}
vault {
address = "http://vault_vault_1:8200"
# This value can also be specified via the environment variable VAULT_TOKEN.
token = "9b02e1d9-31da-bb4b-4c48-62220b163da7"
renew_token = false
}
deduplicate {
enabled = true
prefix = "consul-template/dedup/"
}
template {
source = "./nginx/templates/upstream.conf.ctmpl"
destination = "/etc/nginx/conf.d/upstream.conf"
command = "nginx reload"
command_timeout = "60s"
perms = 0600
backup = true
left_delimiter = "{{"
right_delimiter = "}}"
wait {
min = "2s"
max = "10s"
}
}
template {
source = "./nginx/templates/server.conf.ctmpl"
destination = "/etc/nginx/conf.d/server.conf"
command = "nginx reload"
command_timeout = "60s"
perms = 0600
backup = true
left_delimiter = "{{"
right_delimiter = "}}"
wait {
min = "2s"
max = "10s"
}
}
ports:
- 9090:80
volumes:
- ${PWD}/nginx/config.hcl:/consul-template/config.d/config.hcl
- ${PWD}/nginx/templates:/consul-template/templates/
command: /usr/local/bin/consul-template