diff --git a/docs/configuration/nginx.md b/docs/configuration/nginx.md index 3234d08a..dd63bcd9 100644 --- a/docs/configuration/nginx.md +++ b/docs/configuration/nginx.md @@ -70,3 +70,13 @@ content-length: 169 ``` +### DNS resolution to nginx inside docker network + +By default inside the environment's docker network the environment's hostname will be resolved to the nginx container's +IP address. + +To change this behaviour you can disable it using the following setting in `~/.reward.yml` + +``` +reward_resolve_domain_to_nginx: 0 +``` diff --git a/internal/install.go b/internal/install.go index 97ab2a59..bd1a81d8 100644 --- a/internal/install.go +++ b/internal/install.go @@ -18,7 +18,7 @@ log_level: info debug: false # Uncomment the following settings to disable default services. -# These services are enabled by default. +# These services are enabled by default. #reward_portainer: 0 #reward_dnsmasq: 0 #reward_tunnel: 0 @@ -27,9 +27,15 @@ debug: false #reward_elastichq: 0 # If you want to enable the following services, uncomment any of them. -# These services are disabled by default. +# These services are disabled by default. #reward_adminer: 1 +# By default Reward makes it possible to resolve the environment's domain to the nginx container's IP address +# inside the docker network. To disable this behaviour you can uncomment the following line. +#reward_resolve_domain_to_nginx: 0 + +# By default Reward is not allowed to run commands as root. +# To disable this check you can uncomment the following line. #reward_allow_superuser: 0 ` diff --git a/templates/environments/includes/nginx.base.yml b/templates/environments/includes/nginx.base.yml index 2e27de04..f4c81a69 100644 --- a/templates/environments/includes/nginx.base.yml +++ b/templates/environments/includes/nginx.base.yml @@ -15,7 +15,9 @@ services: - ./{{default ".reward/nginx/" .nginx_custom_configs_path}}:/etc/nginx/snippets/ environment: - XDEBUG_CONNECT_BACK_HOST=${XDEBUG_CONNECT_BACK_HOST:-''} +{{isEnabledPermissive .reward_resolve_to_nginx}} networks: default: aliases: - {{.traefik_domain}} +{{end}}