Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow advanced customization of nginx parameters in addon #3874

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions nginx_proxy/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ options:
default: nginx_proxy_default*.conf
servers: nginx_proxy/*.conf
real_ip_from: []
init_commands: []
ports:
443/tcp: 443
80/tcp: null
Expand All @@ -42,3 +43,5 @@ schema:
servers: str
real_ip_from:
- str
init_commands:
- str
8 changes: 8 additions & 0 deletions nginx_proxy/rootfs/etc/s6-overlay/s6-rc.d/nginx/run
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ if bashio::config.true 'cloudflare'; then
fi
fi

# Executes user configured/requested commands on startup
if bashio::config.has_value 'init_commands'; then
while read -r cmd; do
eval "${cmd}" \
|| bashio::exit.nok "Failed executing init command: ${cmd}"
done <<< "$(bashio::config 'init_commands')"
fi
Ten0 marked this conversation as resolved.
Show resolved Hide resolved

# start server
bashio::log.info "Running nginx..."
stat "/ssl/$(bashio::config 'certfile')" -c %y > /tmp/certificate_timestamp
Expand Down