Skip to content

Commit 7a1d5a4

Browse files
authored
Merge pull request #7 from autopilotpattern/CONSUL=consul
Update "containerpilot.json" to assume "consul" if "CONSUL" is unset
2 parents a862b1d + 445efcc commit 7a1d5a4

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Pass these variables via an `_env` file.
2929
- `MONGO_SECONDARY_CATCHUP_PERIOD`: the number of seconds that the mongod will wait for an electable secondary to catch up to the primary
3030
- `MONGO_STEPDOWN_TIME`: the number of seconds to step down the primary, during which time the stepdown member is ineligible for becoming primary
3131
- `MONGO_ELECTION_TIMEOUT`: after the primary steps down, the amount a tries to check that a new primary has been elected before the node shuts down
32+
- `CONSUL` (optional): when using `local-compose.yml`, this will default to `consul` (and thus use the DNS provided by Docker), but for deploying on Triton via `docker-compose.yml`, this should be set to [the CNS path of the `consul` service (`consul.svc.XXX...`)](https://docs.joyent.com/public-cloud/network/cns)
3233

3334
Not yet implemented:
3435
- `MANTA_URL`: the full Manta endpoint URL. (ex. `https://us-east.manta.joyent.com`)

etc/containerpilot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"consul": "{{ .CONSUL }}:8500",
2+
"consul": "{{ if .CONSUL }}{{ .CONSUL }}{{ else }}consul{{ end }}:8500",
33
"preStart": "python /usr/local/bin/manage.py",
44
"preStop": "python /usr/local/bin/manage.py pre_stop",
55
"services": [

local-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ services:
77
mem_limit: 512m
88
build: .
99
env_file: _env
10-
environment:
11-
- CONSUL=consul
1210
ports:
1311
- 27017
1412

0 commit comments

Comments
 (0)