mirror of https://github.com/k3d-io/k3d
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
626 B
24 lines
626 B
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# Config Options
|
|
INIT_CONFIG_MAX_RETRIES=3
|
|
|
|
# Run confd
|
|
for i in $(seq 1 $INIT_CONFIG_MAX_RETRIES); do
|
|
echo "[$(date -Iseconds)] creating initial nginx config (try $i/$INIT_CONFIG_MAX_RETRIES)"
|
|
confd -onetime -backend file -file /etc/confd/values.yaml -log-level debug -sync-only
|
|
sleep 2
|
|
done
|
|
|
|
# Output Configuration
|
|
echo "===== Initial nginx configuration ====="
|
|
nginx -T -c /etc/nginx/nginx.conf
|
|
echo "======================================="
|
|
|
|
# Start confd in watch mode (every second)
|
|
confd -watch -backend file -file /etc/confd/values.yaml -log-level debug &
|
|
|
|
# Start nginx
|
|
nginx -g 'daemon off;' |