Made docker-compose generate a configuration forcing the domain to be set to $_SERVER['SERVER_NAME'] in order to properly get assets while accessing the website from another device.
This commit is contained in:
parent
b58e61c575
commit
3ec6435323
|
@ -23,7 +23,6 @@ services:
|
|||
- 80:80
|
||||
environment:
|
||||
- ENV=dev
|
||||
- DOMAIN=localhost
|
||||
- APP_NAME=Framadate
|
||||
- ADMIN_MAIL=mon@email.fr
|
||||
- MYSQL_USER=framadate
|
||||
|
|
|
@ -19,9 +19,7 @@ if [ ! -f $FRAMADATE_CONFIG ]; then
|
|||
echo "There is no configuration file. Create one with environment variables"
|
||||
cp /var/www/framadate/tpl/admin/config.tpl $FRAMADATE_CONFIG
|
||||
# Set values on configuration file
|
||||
if [ ! -z "$DOMAIN" ]; then
|
||||
sed -i -E "s/^(\/\/ )?const APP_URL( )?=.*;/const APP_URL = '$DOMAIN';/g" $FRAMADATE_CONFIG
|
||||
fi
|
||||
sed -i -E "s/^(\/\/ )?const APP_URL( )?=.*;/const APP_URL = '$DOMAIN';/g" $FRAMADATE_CONFIG
|
||||
if [ "$FORCE_HTTPS" = true ]; then
|
||||
sed -i -E "s/^(\/\/ )?const FORCE_HTTPS\\s*=.*;/const FORCE_HTTPS = true;/" $FRAMADATE_CONFIG
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue