Adding support for new *.config.php format.

But add backward compatibility for old *.ini.php too
This commit is contained in:
Philipp Holzer 2018-12-29 21:34:21 +01:00
parent 56a7486b56
commit c485511739
No known key found for this signature in database
GPG Key ID: 517BE60E2CE5C8A5
40 changed files with 131 additions and 111 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
trap "break;exit" HUP INT TERM trap "break;exit" HUP INT TERM
while [ ! -f /var/www/html/config/local.ini.php ]; do while [ ! -f /var/www/html/config/local.ini.php ] || [ ! -f /var/www/html/config/local.config.php ]; do
sleep 1 sleep 1
done done

View File

@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible # no downgrading possible
if version_greater "$installed_version" "$image_version"; then if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ('$image_version')', 0 echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1; exit 1;
fi fi
fi fi
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"' install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
install=true install=true
elif [ -f "/usr/src/config/local.ini.php" ]; then elif [ -f "/usr/src/config/local.config.php" ]; then
echo "Installation with prepared local.ini.php" echo "Installation with prepared local.config.php"
install_options="-f /usr/src/local.ini.php" install_options="-f /usr/src/local.config.php"
install=true install=true
fi fi
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# TODO Workaround because of a strange permission issue # TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled rm -fr /var/www/html/view/smarty3/compiled
# load other config files (*.ini.php) to the config folder (currently only local.ini.php and addon.ini.php supported) # load other config files (*.config.php) to the config folder (currently only local.config.php and addon.config.php supported)
if [ -d "/usr/src/config" ]; then if [ -d "/usr/src/config" ]; then
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/ rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
fi fi

View File

@ -5,4 +5,6 @@
/.htaccess /.htaccess
/home.* /home.*
/config/local.ini.php /config/local.ini.php
/config/addon.ini.php /config/addon.ini.php
/config/local.config.php
/config/addon.config.php

View File

@ -1,4 +1,4 @@
FROM friendica/server:apache FROM friendica/server:apache
RUN mkdir -p /usr/src/config RUN mkdir -p /usr/src/config
COPY addon.ini.php /usr/src/config/ COPY addon.config.php /usr/src/config/

View File

@ -0,0 +1,12 @@
<?php
return [
'system' => [
'cache_driver' => 'redis',
'lock_driver' => 'redis',
'redis_host' => 'redis',
'pidfile' => '/var/run/friendica.pid',
]
];

View File

@ -1,12 +0,0 @@
<?php return <<<INI
[system]
cache_driver=redis
lock_driver=redis
redis_host=redis
pidfile = /var/run/friendica.pid
INI;
// Keep this line

View File

@ -1,4 +1,4 @@
FROM friendica/server:fpm-alpine FROM friendica/server:fpm-alpine
RUN mkdir -p /usr/src/config RUN mkdir -p /usr/src/config
COPY addon.ini.php /usr/src/config/ COPY addon.config.php /usr/src/config/

View File

@ -0,0 +1,12 @@
<?php
return [
'system' => [
'cache_driver' => 'redis',
'lock_driver' => 'redis',
'redis_host' => 'redis',
'pidfile' => '/var/run/friendica.pid',
]
];

View File

@ -1,12 +0,0 @@
<?php return <<<INI
[system]
cache_driver=redis
lock_driver=redis
redis_host=redis
pidfile = /var/run/friendica.pid
INI;
// Keep this line

View File

@ -1,4 +1,4 @@
FROM friendica/server:fpm FROM friendica/server:fpm
RUN mkdir -p /usr/src/config RUN mkdir -p /usr/src/config
COPY addon.ini.php /usr/src/config/ COPY addon.config.php /usr/src/config/

View File

@ -0,0 +1,12 @@
<?php
return [
'system' => [
'cache_driver' => 'redis',
'lock_driver' => 'redis',
'redis_host' => 'redis',
'pidfile' => '/var/run/friendica.pid',
]
];

View File

@ -1,12 +0,0 @@
<?php return <<<INI
[system]
cache_driver=redis
lock_driver=redis
redis_host=redis
pidfile = /var/run/friendica.pid
INI;
// Keep this line

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
trap "break;exit" HUP INT TERM trap "break;exit" HUP INT TERM
while [ ! -f /var/www/html/config/local.ini.php ]; do while [ ! -f /var/www/html/config/local.ini.php ] || [ ! -f /var/www/html/config/local.config.php ]; do
sleep 1 sleep 1
done done

View File

@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible # no downgrading possible
if version_greater "$installed_version" "$image_version"; then if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ('$image_version')', 0 echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1; exit 1;
fi fi
fi fi
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"' install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
install=true install=true
elif [ -f "/usr/src/config/local.ini.php" ]; then elif [ -f "/usr/src/config/local.config.php" ]; then
echo "Installation with prepared local.ini.php" echo "Installation with prepared local.config.php"
install_options="-f /usr/src/local.ini.php" install_options="-f /usr/src/local.config.php"
install=true install=true
fi fi
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# TODO Workaround because of a strange permission issue # TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled rm -fr /var/www/html/view/smarty3/compiled
# load other config files (*.ini.php) to the config folder (currently only local.ini.php and addon.ini.php supported) # load other config files (*.config.php) to the config folder (currently only local.config.php and addon.config.php supported)
if [ -d "/usr/src/config" ]; then if [ -d "/usr/src/config" ]; then
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/ rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
fi fi

View File

@ -5,4 +5,6 @@
/.htaccess /.htaccess
/home.* /home.*
/config/local.ini.php /config/local.ini.php
/config/addon.ini.php /config/addon.ini.php
/config/local.config.php
/config/addon.config.php

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
trap "break;exit" HUP INT TERM trap "break;exit" HUP INT TERM
while [ ! -f /var/www/html/config/local.ini.php ]; do while [ ! -f /var/www/html/config/local.ini.php ] || [ ! -f /var/www/html/config/local.config.php ]; do
sleep 1 sleep 1
done done

View File

@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible # no downgrading possible
if version_greater "$installed_version" "$image_version"; then if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ('$image_version')', 0 echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1; exit 1;
fi fi
fi fi
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"' install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
install=true install=true
elif [ -f "/usr/src/config/local.ini.php" ]; then elif [ -f "/usr/src/config/local.config.php" ]; then
echo "Installation with prepared local.ini.php" echo "Installation with prepared local.config.php"
install_options="-f /usr/src/local.ini.php" install_options="-f /usr/src/local.config.php"
install=true install=true
fi fi
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# TODO Workaround because of a strange permission issue # TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled rm -fr /var/www/html/view/smarty3/compiled
# load other config files (*.ini.php) to the config folder (currently only local.ini.php and addon.ini.php supported) # load other config files (*.config.php) to the config folder (currently only local.config.php and addon.config.php supported)
if [ -d "/usr/src/config" ]; then if [ -d "/usr/src/config" ]; then
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/ rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
fi fi

View File

@ -5,4 +5,6 @@
/.htaccess /.htaccess
/home.* /home.*
/config/local.ini.php /config/local.ini.php
/config/addon.ini.php /config/addon.ini.php
/config/local.config.php
/config/addon.config.php

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
trap "break;exit" HUP INT TERM trap "break;exit" HUP INT TERM
while [ ! -f /var/www/html/config/local.ini.php ]; do while [ ! -f /var/www/html/config/local.ini.php ] || [ ! -f /var/www/html/config/local.config.php ]; do
sleep 1 sleep 1
done done

View File

@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible # no downgrading possible
if version_greater "$installed_version" "$image_version"; then if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ('$image_version')', 0 echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1; exit 1;
fi fi
fi fi
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"' install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
install=true install=true
elif [ -f "/usr/src/config/local.ini.php" ]; then elif [ -f "/usr/src/config/local.config.php" ]; then
echo "Installation with prepared local.ini.php" echo "Installation with prepared local.config.php"
install_options="-f /usr/src/local.ini.php" install_options="-f /usr/src/local.config.php"
install=true install=true
fi fi
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# TODO Workaround because of a strange permission issue # TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled rm -fr /var/www/html/view/smarty3/compiled
# load other config files (*.ini.php) to the config folder (currently only local.ini.php and addon.ini.php supported) # load other config files (*.config.php) to the config folder (currently only local.config.php and addon.config.php supported)
if [ -d "/usr/src/config" ]; then if [ -d "/usr/src/config" ]; then
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/ rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
fi fi

View File

@ -5,4 +5,6 @@
/.htaccess /.htaccess
/home.* /home.*
/config/local.ini.php /config/local.ini.php
/config/addon.ini.php /config/addon.ini.php
/config/local.config.php
/config/addon.config.php

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
trap "break;exit" HUP INT TERM trap "break;exit" HUP INT TERM
while [ ! -f /var/www/html/config/local.ini.php ]; do while [ ! -f /var/www/html/config/local.ini.php ] || [ ! -f /var/www/html/config/local.config.php ]; do
sleep 1 sleep 1
done done

View File

@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible # no downgrading possible
if version_greater "$installed_version" "$image_version"; then if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ('$image_version')', 0 echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1; exit 1;
fi fi
fi fi
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"' install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
install=true install=true
elif [ -f "/usr/src/config/local.ini.php" ]; then elif [ -f "/usr/src/config/local.config.php" ]; then
echo "Installation with prepared local.ini.php" echo "Installation with prepared local.config.php"
install_options="-f /usr/src/local.ini.php" install_options="-f /usr/src/local.config.php"
install=true install=true
fi fi
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# TODO Workaround because of a strange permission issue # TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled rm -fr /var/www/html/view/smarty3/compiled
# load other config files (*.ini.php) to the config folder (currently only local.ini.php and addon.ini.php supported) # load other config files (*.config.php) to the config folder (currently only local.config.php and addon.config.php supported)
if [ -d "/usr/src/config" ]; then if [ -d "/usr/src/config" ]; then
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/ rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
fi fi

View File

@ -5,4 +5,6 @@
/.htaccess /.htaccess
/home.* /home.*
/config/local.ini.php /config/local.ini.php
/config/addon.ini.php /config/addon.ini.php
/config/local.config.php
/config/addon.config.php

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
trap "break;exit" HUP INT TERM trap "break;exit" HUP INT TERM
while [ ! -f /var/www/html/config/local.ini.php ]; do while [ ! -f /var/www/html/config/local.ini.php ] || [ ! -f /var/www/html/config/local.config.php ]; do
sleep 1 sleep 1
done done

View File

@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible # no downgrading possible
if version_greater "$installed_version" "$image_version"; then if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ('$image_version')', 0 echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1; exit 1;
fi fi
fi fi
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"' install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
install=true install=true
elif [ -f "/usr/src/config/local.ini.php" ]; then elif [ -f "/usr/src/config/local.config.php" ]; then
echo "Installation with prepared local.ini.php" echo "Installation with prepared local.config.php"
install_options="-f /usr/src/local.ini.php" install_options="-f /usr/src/local.config.php"
install=true install=true
fi fi
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# TODO Workaround because of a strange permission issue # TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled rm -fr /var/www/html/view/smarty3/compiled
# load other config files (*.ini.php) to the config folder (currently only local.ini.php and addon.ini.php supported) # load other config files (*.config.php) to the config folder (currently only local.config.php and addon.config.php supported)
if [ -d "/usr/src/config" ]; then if [ -d "/usr/src/config" ]; then
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/ rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
fi fi

View File

@ -5,4 +5,6 @@
/.htaccess /.htaccess
/home.* /home.*
/config/local.ini.php /config/local.ini.php
/config/addon.ini.php /config/addon.ini.php
/config/local.config.php
/config/addon.config.php

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
trap "break;exit" HUP INT TERM trap "break;exit" HUP INT TERM
while [ ! -f /var/www/html/config/local.ini.php ]; do while [ ! -f /var/www/html/config/local.ini.php ] || [ ! -f /var/www/html/config/local.config.php ]; do
sleep 1 sleep 1
done done

View File

@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible # no downgrading possible
if version_greater "$installed_version" "$image_version"; then if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ('$image_version')', 0 echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1; exit 1;
fi fi
fi fi
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"' install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
install=true install=true
elif [ -f "/usr/src/config/local.ini.php" ]; then elif [ -f "/usr/src/config/local.config.php" ]; then
echo "Installation with prepared local.ini.php" echo "Installation with prepared local.config.php"
install_options="-f /usr/src/local.ini.php" install_options="-f /usr/src/local.config.php"
install=true install=true
fi fi
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# TODO Workaround because of a strange permission issue # TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled rm -fr /var/www/html/view/smarty3/compiled
# load other config files (*.ini.php) to the config folder (currently only local.ini.php and addon.ini.php supported) # load other config files (*.config.php) to the config folder (currently only local.config.php and addon.config.php supported)
if [ -d "/usr/src/config" ]; then if [ -d "/usr/src/config" ]; then
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/ rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
fi fi

View File

@ -5,4 +5,6 @@
/.htaccess /.htaccess
/home.* /home.*
/config/local.ini.php /config/local.ini.php
/config/addon.ini.php /config/addon.ini.php
/config/local.config.php
/config/addon.config.php

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
trap "break;exit" HUP INT TERM trap "break;exit" HUP INT TERM
while [ ! -f /var/www/html/config/local.ini.php ]; do while [ ! -f /var/www/html/config/local.ini.php ] || [ ! -f /var/www/html/config/local.config.php ]; do
sleep 1 sleep 1
done done

View File

@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible # no downgrading possible
if version_greater "$installed_version" "$image_version"; then if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ('$image_version')', 0 echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1; exit 1;
fi fi
fi fi
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"' install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
install=true install=true
elif [ -f "/usr/src/config/local.ini.php" ]; then elif [ -f "/usr/src/config/local.config.php" ]; then
echo "Installation with prepared local.ini.php" echo "Installation with prepared local.config.php"
install_options="-f /usr/src/local.ini.php" install_options="-f /usr/src/local.config.php"
install=true install=true
fi fi
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# TODO Workaround because of a strange permission issue # TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled rm -fr /var/www/html/view/smarty3/compiled
# load other config files (*.ini.php) to the config folder (currently only local.ini.php and addon.ini.php supported) # load other config files (*.config.php) to the config folder (currently only local.config.php and addon.config.php supported)
if [ -d "/usr/src/config" ]; then if [ -d "/usr/src/config" ]; then
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/ rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
fi fi

View File

@ -5,4 +5,6 @@
/.htaccess /.htaccess
/home.* /home.*
/config/local.ini.php /config/local.ini.php
/config/addon.ini.php /config/addon.ini.php
/config/local.config.php
/config/addon.config.php

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
trap "break;exit" HUP INT TERM trap "break;exit" HUP INT TERM
while [ ! -f /var/www/html/config/local.ini.php ]; do while [ ! -f /var/www/html/config/local.ini.php ] || [ ! -f /var/www/html/config/local.config.php ]; do
sleep 1 sleep 1
done done

View File

@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible # no downgrading possible
if version_greater "$installed_version" "$image_version"; then if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ('$image_version')', 0 echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1; exit 1;
fi fi
fi fi
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"' install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
install=true install=true
elif [ -f "/usr/src/config/local.ini.php" ]; then elif [ -f "/usr/src/config/local.config.php" ]; then
echo "Installation with prepared local.ini.php" echo "Installation with prepared local.config.php"
install_options="-f /usr/src/local.ini.php" install_options="-f /usr/src/local.config.php"
install=true install=true
fi fi
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# TODO Workaround because of a strange permission issue # TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled rm -fr /var/www/html/view/smarty3/compiled
# load other config files (*.ini.php) to the config folder (currently only local.ini.php and addon.ini.php supported) # load other config files (*.config.php) to the config folder (currently only local.config.php and addon.config.php supported)
if [ -d "/usr/src/config" ]; then if [ -d "/usr/src/config" ]; then
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/ rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
fi fi

View File

@ -5,4 +5,6 @@
/.htaccess /.htaccess
/home.* /home.*
/config/local.ini.php /config/local.ini.php
/config/addon.ini.php /config/addon.ini.php
/config/local.config.php
/config/addon.config.php

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
trap "break;exit" HUP INT TERM trap "break;exit" HUP INT TERM
while [ ! -f /var/www/html/config/local.ini.php ]; do while [ ! -f /var/www/html/config/local.ini.php ] || [ ! -f /var/www/html/config/local.config.php ]; do
sleep 1 sleep 1
done done

View File

@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible # no downgrading possible
if version_greater "$installed_version" "$image_version"; then if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ('$image_version')', 0 echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1; exit 1;
fi fi
fi fi
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"' install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
install=true install=true
elif [ -f "/usr/src/config/local.ini.php" ]; then elif [ -f "/usr/src/config/local.config.php" ]; then
echo "Installation with prepared local.ini.php" echo "Installation with prepared local.config.php"
install_options="-f /usr/src/local.ini.php" install_options="-f /usr/src/local.config.php"
install=true install=true
fi fi
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# TODO Workaround because of a strange permission issue # TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled rm -fr /var/www/html/view/smarty3/compiled
# load other config files (*.ini.php) to the config folder (currently only local.ini.php and addon.ini.php supported) # load other config files (*.config.php) to the config folder (currently only local.config.php and addon.config.php supported)
if [ -d "/usr/src/config" ]; then if [ -d "/usr/src/config" ]; then
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/ rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
fi fi

View File

@ -5,4 +5,6 @@
/.htaccess /.htaccess
/home.* /home.*
/config/local.ini.php /config/local.ini.php
/config/addon.ini.php /config/addon.ini.php
/config/local.config.php
/config/addon.config.php

View File

@ -158,8 +158,8 @@ You have to set at least the following environment variables (others are optiona
### Using a predefined config file ### Using a predefined config file
You can create a `local.ini.php` and `COPY` it to `/usr/src/config`. You can create a `local.config.php` and `COPY` it to `/usr/src/config`.
If no other environment variable is set, this `local.ini.php` will get copied to the config path. If no other environment variable is set, this `local.config.php` will get copied to the config path.
# Maintenance of the image # Maintenance of the image