Files
Phraseanet/infra/tools/stack_migration/network_conf.sh
Aina Sitraka bc01476ea2 PHRAS-3772 bin/setup system:config add option (#4164)
* add option no compile -s for bin/setup system:config

* check db connection on bin/console

* add -s on  migration script
2022-11-01 16:20:52 +01:00

42 lines
1.4 KiB
Bash

#bin/bash
cd "/var/alchemy/Phraseanet"
## todo remove the current trusted proxies
echo `date +"%Y-%m-%d %H:%M:%S"` " - Applying infrastructure stack setup to Phraseanet Trusted Proxies"
counter=0
if [[ -n $PHRASEANET_TRUSTED_PROXIES ]]; then
for i in $(echo $PHRASEANET_TRUSTED_PROXIES | sed "s/,/ /g")
do
counter=$(( counter+1 ))
if [[ $counter -eq 1 ]] ; then
bin/setup system:config -s set trusted-proxies $i
bin/setup system:config -s add trusted-proxies $i
else
bin/setup system:config -s add trusted-proxies $i
fi
done
fi
echo `date +"%Y-%m-%d %H:%M:%S"` " - Setup of Phraseanet Trusted Proxies applied"
## todo remove the currrent DEBUG_ALLOWED_IP
echo `date +"%Y-%m-%d %H:%M:%S"` " - Applying infrastructure stack setup to Phraseanet debugger allowed IP"
counter=0
if [[ -n $PHRASEANET_DEBUG_ALLOWED_IP ]]; then
for i in $(echo $PHRASEANET_DEBUG_ALLOWED_IP | sed "s/,/ /g")
do
counter=$(( counter+1 ))
if [[ $counter -eq 1 ]] ; then
bin/setup system:config -s set debugger.allowed-ips $i
bin/setup system:config -s add debugger.allowed-ips $i
else
bin/setup system:config -s add debugger.allowed-ips $i
fi
done
fi
echo `date +"%Y-%m-%d %H:%M:%S"` " - Setup of Phraseanet debugger allowed IP applied"
cd -