Skip to content
This repository was archived by the owner on Sep 7, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions 0.X/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
#!/usr/bin/dumb-init /bin/sh
set -e

#ADD acl variables in config/consul.json

cat > /consul/config/consul.json <<EOF
{
"datacenter": "$DATACENTER",
"data_dir": "/consul/data/",
"log_level": "$LOG_LEVEL",
"node_name": "$HOSTNAME",
"server": true,
"bootstrap_expect": 1,
"client_addr": "0.0.0.0",
"ui": $UI_ENABLE,
"acl_datacenter": "$DATACENTER",
"acl_master_token": "$ACL_MASTER_TOKEN",
"acl_default_policy": "$ACL_DEFAULT_POLICY",
"acl_down_policy": "$ACL_DOWN_POLICY",
"acl_agent_token": "$ACL_AGENT_TOKEN"
}
EOF

# Note above that we run dumb-init as PID 1 in order to reap zombie processes
# as well as forward signals to all processes in its session. Normally, sh
# wouldn't do either of these functions so we'd leak zombies as well as do
Expand Down