Rename composer hostnames

Previously, all containers had hostnames corresponding to their domains.
This made it impossible to use curl and friends from within the
containers. This commit renames the hostnames of the containers to
append a '.wisski' suffix.
This commit is contained in:
Tom Wiesing 2020-11-12 18:57:31 +01:00
parent b461893834
commit e856afdc93
No known key found for this signature in database
GPG key ID: DC1F29F2BC78AB15
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@ services:
barrel: barrel:
build: . build: .
restart: always restart: always
hostname: ${VIRTUAL_HOST} hostname: ${VIRTUAL_HOST}.wisski
environment: environment:
# port and hostname for this image to use # port and hostname for this image to use
VIRTUAL_HOST: ${VIRTUAL_HOST} VIRTUAL_HOST: ${VIRTUAL_HOST}

View file

@ -3,7 +3,7 @@
# This utility script can be used to configure the trusted host settings inside of settings.php. # This utility script can be used to configure the trusted host settings inside of settings.php.
# It doesn't take care of corner cases and should only be used when needed. # It doesn't take care of corner cases and should only be used when needed.
INSTANCE_DOMAIN="$(hostname -f)" INSTANCE_DOMAIN="${VIRTUAL_HOST}"
chmod u+w web/sites/default/settings.php chmod u+w web/sites/default/settings.php
echo "" >> web/sites/default/settings.php echo "" >> web/sites/default/settings.php
echo "\$settings['trusted_host_patterns'] = ['${INSTANCE_DOMAIN//\./\\\.}'];" >> web/sites/default/settings.php echo "\$settings['trusted_host_patterns'] = ['${INSTANCE_DOMAIN//\./\\\.}'];" >> web/sites/default/settings.php