Skip to content

Commit

Permalink
feat: resolve the environment's domain to the nginx container from in…
Browse files Browse the repository at this point in the history
…side the network
  • Loading branch information
Janos Miko committed Feb 12, 2021
1 parent 2245381 commit 99f9b6d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
10 changes: 10 additions & 0 deletions docs/configuration/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
10 changes: 8 additions & 2 deletions internal/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
`

Expand Down
2 changes: 2 additions & 0 deletions templates/environments/includes/nginx.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}

0 comments on commit 99f9b6d

Please sign in to comment.