mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
Merge pull request #5671 from nextcloud/enh/5660/allow-adjust-name-of-container
nextcloud: allow to adjust name of nextcloud container
This commit is contained in:
commit
0cf6b07247
2 changed files with 9 additions and 3 deletions
|
|
@ -592,12 +592,17 @@ if [ -n "$ADDITIONAL_TRUSTED_PROXY" ]; then
|
|||
php /var/www/html/occ config:system:set trusted_proxies 2 --value="$ADDITIONAL_TRUSTED_PROXY"
|
||||
fi
|
||||
|
||||
# Get ipv4-address of Nextcloud
|
||||
IPv4_ADDRESS="$(dig nextcloud-aio-nextcloud A +short +search | head -1)"
|
||||
# Get ipv4-address of Nextcloud
|
||||
if [ -z "$NEXTCLOUD_HOST" ]; then
|
||||
export NEXTCLOUD_HOST="nextcloud-aio-nextcloud"
|
||||
fi
|
||||
IPv4_ADDRESS="$(dig "$NEXTCLOUD_HOST" A +short +search | head -1)"
|
||||
# Bring it in CIDR notation
|
||||
# shellcheck disable=SC2001
|
||||
IPv4_ADDRESS="$(echo "$IPv4_ADDRESS" | sed 's|[0-9]\+$|0/16|')"
|
||||
php /var/www/html/occ config:system:set trusted_proxies 10 --value="$IPv4_ADDRESS"
|
||||
if [ -n "$IPv4_ADDRESS" ]; then
|
||||
php /var/www/html/occ config:system:set trusted_proxies 10 --value="$IPv4_ADDRESS"
|
||||
fi
|
||||
|
||||
if [ -n "$ADDITIONAL_TRUSTED_DOMAIN" ]; then
|
||||
php /var/www/html/occ config:system:set trusted_domains 2 --value="$ADDITIONAL_TRUSTED_DOMAIN"
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@
|
|||
}
|
||||
],
|
||||
"environment": [
|
||||
"NEXTCLOUD_HOST=nextcloud-aio-nextcloud",
|
||||
"POSTGRES_HOST=nextcloud-aio-database",
|
||||
"POSTGRES_PORT=5432",
|
||||
"POSTGRES_PASSWORD=%DATABASE_PASSWORD%",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue