mirror of https://github.com/friendica/docker
Adding support for new *.config.php format.
But add backward compatibility for old *.ini.php too
This commit is contained in:
parent
56a7486b56
commit
c485511739
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
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
|
||||
done
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
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;
|
||||
fi
|
||||
fi
|
||||
|
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# shellcheck disable=SC2016
|
||||
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
|
||||
install=true
|
||||
elif [ -f "/usr/src/config/local.ini.php" ]; then
|
||||
echo "Installation with prepared local.ini.php"
|
||||
elif [ -f "/usr/src/config/local.config.php" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# TODO Workaround because of a strange permission issue
|
||||
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
|
||||
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
|
||||
fi
|
||||
|
|
|
@ -5,4 +5,6 @@
|
|||
/.htaccess
|
||||
/home.*
|
||||
/config/local.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/local.config.php
|
||||
/config/addon.config.php
|
|
@ -1,4 +1,4 @@
|
|||
FROM friendica/server:apache
|
||||
|
||||
RUN mkdir -p /usr/src/config
|
||||
COPY addon.ini.php /usr/src/config/
|
||||
COPY addon.config.php /usr/src/config/
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'system' => [
|
||||
'cache_driver' => 'redis',
|
||||
'lock_driver' => 'redis',
|
||||
|
||||
'redis_host' => 'redis',
|
||||
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
]
|
||||
];
|
|
@ -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
|
|
@ -1,4 +1,4 @@
|
|||
FROM friendica/server:fpm-alpine
|
||||
|
||||
RUN mkdir -p /usr/src/config
|
||||
COPY addon.ini.php /usr/src/config/
|
||||
COPY addon.config.php /usr/src/config/
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'system' => [
|
||||
'cache_driver' => 'redis',
|
||||
'lock_driver' => 'redis',
|
||||
|
||||
'redis_host' => 'redis',
|
||||
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
]
|
||||
];
|
|
@ -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
|
|
@ -1,4 +1,4 @@
|
|||
FROM friendica/server:fpm
|
||||
|
||||
RUN mkdir -p /usr/src/config
|
||||
COPY addon.ini.php /usr/src/config/
|
||||
COPY addon.config.php /usr/src/config/
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'system' => [
|
||||
'cache_driver' => 'redis',
|
||||
'lock_driver' => 'redis',
|
||||
|
||||
'redis_host' => 'redis',
|
||||
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
]
|
||||
];
|
|
@ -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
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
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
|
||||
done
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
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;
|
||||
fi
|
||||
fi
|
||||
|
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# shellcheck disable=SC2016
|
||||
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
|
||||
install=true
|
||||
elif [ -f "/usr/src/config/local.ini.php" ]; then
|
||||
echo "Installation with prepared local.ini.php"
|
||||
elif [ -f "/usr/src/config/local.config.php" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# TODO Workaround because of a strange permission issue
|
||||
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
|
||||
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
|
||||
fi
|
||||
|
|
|
@ -5,4 +5,6 @@
|
|||
/.htaccess
|
||||
/home.*
|
||||
/config/local.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/local.config.php
|
||||
/config/addon.config.php
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
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
|
||||
done
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
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;
|
||||
fi
|
||||
fi
|
||||
|
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# shellcheck disable=SC2016
|
||||
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
|
||||
install=true
|
||||
elif [ -f "/usr/src/config/local.ini.php" ]; then
|
||||
echo "Installation with prepared local.ini.php"
|
||||
elif [ -f "/usr/src/config/local.config.php" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# TODO Workaround because of a strange permission issue
|
||||
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
|
||||
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
|
||||
fi
|
||||
|
|
|
@ -5,4 +5,6 @@
|
|||
/.htaccess
|
||||
/home.*
|
||||
/config/local.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/local.config.php
|
||||
/config/addon.config.php
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
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
|
||||
done
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
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;
|
||||
fi
|
||||
fi
|
||||
|
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# shellcheck disable=SC2016
|
||||
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
|
||||
install=true
|
||||
elif [ -f "/usr/src/config/local.ini.php" ]; then
|
||||
echo "Installation with prepared local.ini.php"
|
||||
elif [ -f "/usr/src/config/local.config.php" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# TODO Workaround because of a strange permission issue
|
||||
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
|
||||
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
|
||||
fi
|
||||
|
|
|
@ -5,4 +5,6 @@
|
|||
/.htaccess
|
||||
/home.*
|
||||
/config/local.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/local.config.php
|
||||
/config/addon.config.php
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
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
|
||||
done
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
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;
|
||||
fi
|
||||
fi
|
||||
|
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# shellcheck disable=SC2016
|
||||
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
|
||||
install=true
|
||||
elif [ -f "/usr/src/config/local.ini.php" ]; then
|
||||
echo "Installation with prepared local.ini.php"
|
||||
elif [ -f "/usr/src/config/local.config.php" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# TODO Workaround because of a strange permission issue
|
||||
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
|
||||
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
|
||||
fi
|
||||
|
|
|
@ -5,4 +5,6 @@
|
|||
/.htaccess
|
||||
/home.*
|
||||
/config/local.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/local.config.php
|
||||
/config/addon.config.php
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
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
|
||||
done
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
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;
|
||||
fi
|
||||
fi
|
||||
|
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# shellcheck disable=SC2016
|
||||
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
|
||||
install=true
|
||||
elif [ -f "/usr/src/config/local.ini.php" ]; then
|
||||
echo "Installation with prepared local.ini.php"
|
||||
elif [ -f "/usr/src/config/local.config.php" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# TODO Workaround because of a strange permission issue
|
||||
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
|
||||
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
|
||||
fi
|
||||
|
|
|
@ -5,4 +5,6 @@
|
|||
/.htaccess
|
||||
/home.*
|
||||
/config/local.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/local.config.php
|
||||
/config/addon.config.php
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
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
|
||||
done
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
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;
|
||||
fi
|
||||
fi
|
||||
|
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# shellcheck disable=SC2016
|
||||
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
|
||||
install=true
|
||||
elif [ -f "/usr/src/config/local.ini.php" ]; then
|
||||
echo "Installation with prepared local.ini.php"
|
||||
elif [ -f "/usr/src/config/local.config.php" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# TODO Workaround because of a strange permission issue
|
||||
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
|
||||
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
|
||||
fi
|
||||
|
|
|
@ -5,4 +5,6 @@
|
|||
/.htaccess
|
||||
/home.*
|
||||
/config/local.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/local.config.php
|
||||
/config/addon.config.php
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
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
|
||||
done
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
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;
|
||||
fi
|
||||
fi
|
||||
|
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# shellcheck disable=SC2016
|
||||
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
|
||||
install=true
|
||||
elif [ -f "/usr/src/config/local.ini.php" ]; then
|
||||
echo "Installation with prepared local.ini.php"
|
||||
elif [ -f "/usr/src/config/local.config.php" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# TODO Workaround because of a strange permission issue
|
||||
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
|
||||
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
|
||||
fi
|
||||
|
|
|
@ -5,4 +5,6 @@
|
|||
/.htaccess
|
||||
/home.*
|
||||
/config/local.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/local.config.php
|
||||
/config/addon.config.php
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
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
|
||||
done
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
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;
|
||||
fi
|
||||
fi
|
||||
|
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# shellcheck disable=SC2016
|
||||
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
|
||||
install=true
|
||||
elif [ -f "/usr/src/config/local.ini.php" ]; then
|
||||
echo "Installation with prepared local.ini.php"
|
||||
elif [ -f "/usr/src/config/local.config.php" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# TODO Workaround because of a strange permission issue
|
||||
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
|
||||
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
|
||||
fi
|
||||
|
|
|
@ -5,4 +5,6 @@
|
|||
/.htaccess
|
||||
/home.*
|
||||
/config/local.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/local.config.php
|
||||
/config/addon.config.php
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
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
|
||||
done
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
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;
|
||||
fi
|
||||
fi
|
||||
|
@ -158,10 +158,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# shellcheck disable=SC2016
|
||||
install_options=$install_options' --admin "'$FRIENDICA_ADMIN_MAIL'" --tz "'$FRIENDICA_TZ'" --lang "'$FRIENDICA_LANG'"'
|
||||
install=true
|
||||
elif [ -f "/usr/src/config/local.ini.php" ]; then
|
||||
echo "Installation with prepared local.ini.php"
|
||||
elif [ -f "/usr/src/config/local.config.php" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -174,7 +174,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
# TODO Workaround because of a strange permission issue
|
||||
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
|
||||
rsync $rsync_options --ignore-existing /usr/src/config/ /var/www/html/config/
|
||||
fi
|
||||
|
|
|
@ -5,4 +5,6 @@
|
|||
/.htaccess
|
||||
/home.*
|
||||
/config/local.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/addon.ini.php
|
||||
/config/local.config.php
|
||||
/config/addon.config.php
|
|
@ -158,8 +158,8 @@ You have to set at least the following environment variables (others are optiona
|
|||
|
||||
### Using a predefined config file
|
||||
|
||||
You can create a `local.ini.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.
|
||||
You can create a `local.config.php` and `COPY` it to `/usr/src/config`.
|
||||
If no other environment variable is set, this `local.config.php` will get copied to the config path.
|
||||
|
||||
# Maintenance of the image
|
||||
|
||||
|
|
Loading…
Reference in New Issue