Skip to content
Snippets Groups Projects
Unverified Commit 3ec64353 authored by Marc Karassev's avatar Marc Karassev Committed by Paul B
Browse files

Made docker-compose generate a configuration forcing the domain to be set to...

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.
parent b58e61c5
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,6 @@ services: ...@@ -23,7 +23,6 @@ services:
- 80:80 - 80:80
environment: environment:
- ENV=dev - ENV=dev
- DOMAIN=localhost
- APP_NAME=Framadate - APP_NAME=Framadate
- ADMIN_MAIL=mon@email.fr - ADMIN_MAIL=mon@email.fr
- MYSQL_USER=framadate - MYSQL_USER=framadate
......
...@@ -19,9 +19,7 @@ if [ ! -f $FRAMADATE_CONFIG ]; then ...@@ -19,9 +19,7 @@ if [ ! -f $FRAMADATE_CONFIG ]; then
echo "There is no configuration file. Create one with environment variables" echo "There is no configuration file. Create one with environment variables"
cp /var/www/framadate/tpl/admin/config.tpl $FRAMADATE_CONFIG cp /var/www/framadate/tpl/admin/config.tpl $FRAMADATE_CONFIG
# Set values on configuration file # Set values on configuration file
if [ ! -z "$DOMAIN" ]; then sed -i -E "s/^(\/\/ )?const APP_URL( )?=.*;/const APP_URL = '$DOMAIN';/g" $FRAMADATE_CONFIG
sed -i -E "s/^(\/\/ )?const APP_URL( )?=.*;/const APP_URL = '$DOMAIN';/g" $FRAMADATE_CONFIG
fi
if [ "$FORCE_HTTPS" = true ]; then if [ "$FORCE_HTTPS" = true ]; then
sed -i -E "s/^(\/\/ )?const FORCE_HTTPS\\s*=.*;/const FORCE_HTTPS = true;/" $FRAMADATE_CONFIG sed -i -E "s/^(\/\/ )?const FORCE_HTTPS\\s*=.*;/const FORCE_HTTPS = true;/" $FRAMADATE_CONFIG
fi fi
......
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