Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f1f395c10b |
4 changed files with 23 additions and 1 deletions
|
@ -110,12 +110,17 @@ if [[ $* == 'forego start -r' ]]; then
|
||||||
|
|
||||||
_setup_dhparam
|
_setup_dhparam
|
||||||
|
|
||||||
if [ -z "${TRUST_DOWNSTREAM_PROXY}" ]; then
|
if [[ -z "${TRUST_DOWNSTREAM_PROXY}" ]]; then
|
||||||
cat >&2 <<-EOT
|
cat >&2 <<-EOT
|
||||||
Warning: TRUST_DOWNSTREAM_PROXY is not set; defaulting to "true". For security, you should explicitly set TRUST_DOWNSTREAM_PROXY to "false" if there is not a trusted reverse proxy in front of this proxy.
|
Warning: TRUST_DOWNSTREAM_PROXY is not set; defaulting to "true". For security, you should explicitly set TRUST_DOWNSTREAM_PROXY to "false" if there is not a trusted reverse proxy in front of this proxy.
|
||||||
Warning: The default value of TRUST_DOWNSTREAM_PROXY might change to "false" in a future version of nginx-proxy. If you require TRUST_DOWNSTREAM_PROXY to be enabled, explicitly set it to "true".
|
Warning: The default value of TRUST_DOWNSTREAM_PROXY might change to "false" in a future version of nginx-proxy. If you require TRUST_DOWNSTREAM_PROXY to be enabled, explicitly set it to "true".
|
||||||
EOT
|
EOT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Execute upstream nginx entrypoint if present
|
||||||
|
if [[ -f /docker-entrypoint.sh ]]; then
|
||||||
|
/docker-entrypoint.sh nginx -v
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|
1
test/test_nginx-entrypoint/test.conf.template
Normal file
1
test/test_nginx-entrypoint/test.conf.template
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# some_directive ${TEST_VARIABLE};
|
6
test/test_nginx-entrypoint/test_nginx-entrypoint.py
Normal file
6
test/test_nginx-entrypoint/test_nginx-entrypoint.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
def test_templatefile_was_rendered_by_nginx_entrypoint(docker_compose, nginxproxy):
|
||||||
|
conf = nginxproxy.get_conf().decode('ASCII')
|
||||||
|
assert "# some_directive FOOBARBAZ;" in conf
|
10
test/test_nginx-entrypoint/test_nginx-entrypoint.yml
Normal file
10
test/test_nginx-entrypoint/test_nginx-entrypoint.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
version: "2"
|
||||||
|
|
||||||
|
services:
|
||||||
|
sut:
|
||||||
|
image: nginxproxy/nginx-proxy:test
|
||||||
|
environment:
|
||||||
|
TEST_VARIABLE: "FOOBARBAZ"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||||
|
- ./test.conf.template:/etc/nginx/templates/test.conf.template:ro
|
Loading…
Reference in a new issue