Skip to content
Snippets Groups Projects
Commit f5e7de06 authored by jurgenhaas's avatar jurgenhaas
Browse files

Only use local IP for PHP container, if env variable LOCAL_IP is set to 1 or...

Only use local IP for PHP container, if env variable LOCAL_IP is set to 1 or if related subdomains are defined. Setting LOCAL_IP=1 is recommended for local dev environments and for hosts on Azure, etc.
parent 149ce50b
No related branches found
No related tags found
1 merge request!53Merging develop into main
Pipeline #721696 passed
This commit is part of merge request !53. Comments created here will be created in the context of that merge request.
......@@ -215,7 +215,6 @@ class Handler extends BaseHandler {
$this->getDockerMountSource('/ssh-agent') :
'$SSH_AUTH_SOCK';
}
$this->config->setValue('php', $php, FALSE);
$this->config->setValue('projectroot', $projectRoot, FALSE);
$this->config->setValue('projectdomain', $this->config->readValue('projectname') . '.' . $traefik['domain'], FALSE);
$this->config->setValue('projectprotocol', 'http' . ($traefik['usessl'] ? 's' : ''), FALSE);
......@@ -233,8 +232,9 @@ class Handler extends BaseHandler {
}
$this->config->setValue('relatedprojectdomains', $relatedprojectdomains, FALSE);
if (!empty($relatedprojectdomains)) {
$this->config->setValue('localip', TRUE, FALSE);
$php['localip'] = TRUE;
}
$this->config->setValue('php', $php, FALSE);
// Get ID of Docker group
$docker_group_id = trim(shell_exec('stat -c "%g" /var/run/docker.sock'));
......
......@@ -101,7 +101,7 @@ services:
{% if wkhtmltox.enable %}
- './.docker-init/wkhtmltox.sh:/docker-entrypoint-init.d/50-wkhtmltox.sh'
{% endif %}
{% if localip %}
{% if php.localip %}
extra_hosts:
- '{{ projectdomain }}:{{ docker0.ip }}'
{% for subdomain in relatedprojectdomains %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment