mirror of
https://github.com/friendica/docker
synced 2025-03-30 03:37:07 +02:00
Bugfixings
- `.bin/friendica` copy bug - `.config/htconfig.php` was not well prepared for MariaDB
This commit is contained in:
parent
4c43c9037e
commit
ea387bf9e8
8 changed files with 50 additions and 52 deletions
|
@ -8,9 +8,6 @@ AUTOINSTALL=${AUTOINSTALL:-false}
|
||||||
SOURCEDIR=/usr/src
|
SOURCEDIR=/usr/src
|
||||||
WORKDIR=/var/www/html
|
WORKDIR=/var/www/html
|
||||||
|
|
||||||
# change delimiter for arrays from whitespaces to newlines (so we can pass strings with whitespaces)
|
|
||||||
#IFS=\r\n
|
|
||||||
|
|
||||||
VERBOSE=1
|
VERBOSE=1
|
||||||
for arg; do
|
for arg; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
|
@ -168,9 +165,7 @@ install() {
|
||||||
if [ ! -f ${WORKDIR}/.htconfig.php ] &&
|
if [ ! -f ${WORKDIR}/.htconfig.php ] &&
|
||||||
[ -f ${SOURCEDIR}/config/htconfig.php ] &&
|
[ -f ${SOURCEDIR}/config/htconfig.php ] &&
|
||||||
"$AUTOINSTALL" == "true"; then
|
"$AUTOINSTALL" == "true"; then
|
||||||
run_as "cp ${SOURCEDIR}/config/htconfig.php ${WORKDIR}/html/.htconfig.php"
|
run_as "cp ${SOURCEDIR}/config/htconfig.php ${WORKDIR}/.htconfig.php"
|
||||||
# TODO Pull Request for dba Change
|
|
||||||
run_as "sed -i 's/\s+\sDNS_CNAME//g' ${WORKDIR}/include/dba.php"
|
|
||||||
console "autoinstall -f .htconfig.php"
|
console "autoinstall -f .htconfig.php"
|
||||||
# TODO Workaround because of a strange permission issue
|
# TODO Workaround because of a strange permission issue
|
||||||
rm -fr ${WORKDIR}/view/smarty3/compiled
|
rm -fr ${WORKDIR}/view/smarty3/compiled
|
||||||
|
@ -213,10 +208,10 @@ if [ $# -eq 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
install) shift; install "$@";;
|
install) shift; install $@;;
|
||||||
update) shift; update "$@" ;;
|
update) shift; update $@ ;;
|
||||||
console) shift; console "$@" ;;
|
console) shift; console $@ ;;
|
||||||
composer) shift; composer "$@" ;;
|
composer) shift; composer $@ ;;
|
||||||
sendmail) shift; sendmail "$@" ;;
|
sendmail) shift; sendmail $@ ;;
|
||||||
*) friendica_help ;;
|
*) friendica_help ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -3,14 +3,20 @@
|
||||||
// Custom htconfig.php for Docker usage.
|
// Custom htconfig.php for Docker usage.
|
||||||
// Uses a lot of environment variables
|
// Uses a lot of environment variables
|
||||||
|
|
||||||
|
// Use environment variables for mysql if they are set beforehand
|
||||||
|
|
||||||
// Use environment variables for mysql if they are set beforehand
|
// Use environment variables for mysql if they are set beforehand
|
||||||
if (!empty(getenv('MYSQL_HOST'))
|
if (!empty(getenv('MYSQL_HOST'))
|
||||||
&& !empty(getenv('MYSQL_PORT'))
|
&& !empty(getenv('MYSQL_PORT'))
|
||||||
&& !empty(getenv('MYSQL_USERNAME'))
|
&& (!empty(getenv('MYSQL_USERNAME')) || !empty(getenv('MYSQL_USER')))
|
||||||
&& !empty(getenv('MYSQL_PASSWORD'))
|
&& !empty(getenv('MYSQL_PASSWORD'))
|
||||||
&& !empty(getenv('MYSQL_DATABASE'))) {
|
&& !empty(getenv('MYSQL_DATABASE'))) {
|
||||||
$db_host = getenv('MYSQL_HOST') . ':' . getenv('MYSQL_PORT');
|
$db_host = getenv('MYSQL_HOST') . ':' . getenv('MYSQL_PORT');
|
||||||
$db_user = getenv('MYSQL_USERNAME');
|
if (!empty(getenv('MYSQL_USERNAME'))) {
|
||||||
|
$db_user = getenv('MYSQL_USERNAME');
|
||||||
|
} elseif (!empty(getenv('MYSQL_USER'))) {
|
||||||
|
$db_user = getenv('MYSQL_USER');
|
||||||
|
}
|
||||||
$db_pass = getenv('MYSQL_PASSWORD');
|
$db_pass = getenv('MYSQL_PASSWORD');
|
||||||
$db_data = getenv('MYSQL_DATABASE');
|
$db_data = getenv('MYSQL_DATABASE');
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,6 @@ AUTOINSTALL=${AUTOINSTALL:-false}
|
||||||
SOURCEDIR=/usr/src
|
SOURCEDIR=/usr/src
|
||||||
WORKDIR=/var/www/html
|
WORKDIR=/var/www/html
|
||||||
|
|
||||||
# change delimiter for arrays from whitespaces to newlines (so we can pass strings with whitespaces)
|
|
||||||
#IFS=\r\n
|
|
||||||
|
|
||||||
VERBOSE=1
|
VERBOSE=1
|
||||||
for arg; do
|
for arg; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
|
@ -168,9 +165,7 @@ install() {
|
||||||
if [ ! -f ${WORKDIR}/.htconfig.php ] &&
|
if [ ! -f ${WORKDIR}/.htconfig.php ] &&
|
||||||
[ -f ${SOURCEDIR}/config/htconfig.php ] &&
|
[ -f ${SOURCEDIR}/config/htconfig.php ] &&
|
||||||
"$AUTOINSTALL" == "true"; then
|
"$AUTOINSTALL" == "true"; then
|
||||||
run_as "cp ${SOURCEDIR}/config/htconfig.php ${WORKDIR}/html/.htconfig.php"
|
run_as "cp ${SOURCEDIR}/config/htconfig.php ${WORKDIR}/.htconfig.php"
|
||||||
# TODO Pull Request for dba Change
|
|
||||||
run_as "sed -i 's/\s+\sDNS_CNAME//g' ${WORKDIR}/include/dba.php"
|
|
||||||
console "autoinstall -f .htconfig.php"
|
console "autoinstall -f .htconfig.php"
|
||||||
# TODO Workaround because of a strange permission issue
|
# TODO Workaround because of a strange permission issue
|
||||||
rm -fr ${WORKDIR}/view/smarty3/compiled
|
rm -fr ${WORKDIR}/view/smarty3/compiled
|
||||||
|
@ -213,10 +208,10 @@ if [ $# -eq 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
install) shift; install "$@";;
|
install) shift; install $@;;
|
||||||
update) shift; update "$@" ;;
|
update) shift; update $@ ;;
|
||||||
console) shift; console "$@" ;;
|
console) shift; console $@ ;;
|
||||||
composer) shift; composer "$@" ;;
|
composer) shift; composer $@ ;;
|
||||||
sendmail) shift; sendmail "$@" ;;
|
sendmail) shift; sendmail $@ ;;
|
||||||
*) friendica_help ;;
|
*) friendica_help ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -6,11 +6,15 @@
|
||||||
// Use environment variables for mysql if they are set beforehand
|
// Use environment variables for mysql if they are set beforehand
|
||||||
if (!empty(getenv('MYSQL_HOST'))
|
if (!empty(getenv('MYSQL_HOST'))
|
||||||
&& !empty(getenv('MYSQL_PORT'))
|
&& !empty(getenv('MYSQL_PORT'))
|
||||||
&& !empty(getenv('MYSQL_USERNAME'))
|
&& (!empty(getenv('MYSQL_USERNAME')) || !empty(getenv('MYSQL_USER')))
|
||||||
&& !empty(getenv('MYSQL_PASSWORD'))
|
&& !empty(getenv('MYSQL_PASSWORD'))
|
||||||
&& !empty(getenv('MYSQL_DATABASE'))) {
|
&& !empty(getenv('MYSQL_DATABASE'))) {
|
||||||
$db_host = getenv('MYSQL_HOST') . ':' . getenv('MYSQL_PORT');
|
$db_host = getenv('MYSQL_HOST') . ':' . getenv('MYSQL_PORT');
|
||||||
$db_user = getenv('MYSQL_USERNAME');
|
if (!empty(getenv('MYSQL_USERNAME'))) {
|
||||||
|
$db_user = getenv('MYSQL_USERNAME');
|
||||||
|
} elseif (!empty(getenv('MYSQL_USER'))) {
|
||||||
|
$db_user = getenv('MYSQL_USER');
|
||||||
|
}
|
||||||
$db_pass = getenv('MYSQL_PASSWORD');
|
$db_pass = getenv('MYSQL_PASSWORD');
|
||||||
$db_data = getenv('MYSQL_DATABASE');
|
$db_data = getenv('MYSQL_DATABASE');
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,6 @@ AUTOINSTALL=${AUTOINSTALL:-false}
|
||||||
SOURCEDIR=/usr/src
|
SOURCEDIR=/usr/src
|
||||||
WORKDIR=/var/www/html
|
WORKDIR=/var/www/html
|
||||||
|
|
||||||
# change delimiter for arrays from whitespaces to newlines (so we can pass strings with whitespaces)
|
|
||||||
#IFS=\r\n
|
|
||||||
|
|
||||||
VERBOSE=1
|
VERBOSE=1
|
||||||
for arg; do
|
for arg; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
|
@ -168,9 +165,7 @@ install() {
|
||||||
if [ ! -f ${WORKDIR}/.htconfig.php ] &&
|
if [ ! -f ${WORKDIR}/.htconfig.php ] &&
|
||||||
[ -f ${SOURCEDIR}/config/htconfig.php ] &&
|
[ -f ${SOURCEDIR}/config/htconfig.php ] &&
|
||||||
"$AUTOINSTALL" == "true"; then
|
"$AUTOINSTALL" == "true"; then
|
||||||
run_as "cp ${SOURCEDIR}/config/htconfig.php ${WORKDIR}/html/.htconfig.php"
|
run_as "cp ${SOURCEDIR}/config/htconfig.php ${WORKDIR}/.htconfig.php"
|
||||||
# TODO Pull Request for dba Change
|
|
||||||
run_as "sed -i 's/\s+\sDNS_CNAME//g' ${WORKDIR}/include/dba.php"
|
|
||||||
console "autoinstall -f .htconfig.php"
|
console "autoinstall -f .htconfig.php"
|
||||||
# TODO Workaround because of a strange permission issue
|
# TODO Workaround because of a strange permission issue
|
||||||
rm -fr ${WORKDIR}/view/smarty3/compiled
|
rm -fr ${WORKDIR}/view/smarty3/compiled
|
||||||
|
@ -213,10 +208,10 @@ if [ $# -eq 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
install) shift; install "$@";;
|
install) shift; install $@;;
|
||||||
update) shift; update "$@" ;;
|
update) shift; update $@ ;;
|
||||||
console) shift; console "$@" ;;
|
console) shift; console $@ ;;
|
||||||
composer) shift; composer "$@" ;;
|
composer) shift; composer $@ ;;
|
||||||
sendmail) shift; sendmail "$@" ;;
|
sendmail) shift; sendmail $@ ;;
|
||||||
*) friendica_help ;;
|
*) friendica_help ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -6,11 +6,15 @@
|
||||||
// Use environment variables for mysql if they are set beforehand
|
// Use environment variables for mysql if they are set beforehand
|
||||||
if (!empty(getenv('MYSQL_HOST'))
|
if (!empty(getenv('MYSQL_HOST'))
|
||||||
&& !empty(getenv('MYSQL_PORT'))
|
&& !empty(getenv('MYSQL_PORT'))
|
||||||
&& !empty(getenv('MYSQL_USERNAME'))
|
&& (!empty(getenv('MYSQL_USERNAME')) || !empty(getenv('MYSQL_USER')))
|
||||||
&& !empty(getenv('MYSQL_PASSWORD'))
|
&& !empty(getenv('MYSQL_PASSWORD'))
|
||||||
&& !empty(getenv('MYSQL_DATABASE'))) {
|
&& !empty(getenv('MYSQL_DATABASE'))) {
|
||||||
$db_host = getenv('MYSQL_HOST') . ':' . getenv('MYSQL_PORT');
|
$db_host = getenv('MYSQL_HOST') . ':' . getenv('MYSQL_PORT');
|
||||||
$db_user = getenv('MYSQL_USERNAME');
|
if (!empty(getenv('MYSQL_USERNAME'))) {
|
||||||
|
$db_user = getenv('MYSQL_USERNAME');
|
||||||
|
} elseif (!empty(getenv('MYSQL_USER'))) {
|
||||||
|
$db_user = getenv('MYSQL_USER');
|
||||||
|
}
|
||||||
$db_pass = getenv('MYSQL_PASSWORD');
|
$db_pass = getenv('MYSQL_PASSWORD');
|
||||||
$db_data = getenv('MYSQL_DATABASE');
|
$db_data = getenv('MYSQL_DATABASE');
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,6 @@ AUTOINSTALL=${AUTOINSTALL:-false}
|
||||||
SOURCEDIR=/usr/src
|
SOURCEDIR=/usr/src
|
||||||
WORKDIR=/var/www/html
|
WORKDIR=/var/www/html
|
||||||
|
|
||||||
# change delimiter for arrays from whitespaces to newlines (so we can pass strings with whitespaces)
|
|
||||||
#IFS=\r\n
|
|
||||||
|
|
||||||
VERBOSE=1
|
VERBOSE=1
|
||||||
for arg; do
|
for arg; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
|
@ -168,9 +165,7 @@ install() {
|
||||||
if [ ! -f ${WORKDIR}/.htconfig.php ] &&
|
if [ ! -f ${WORKDIR}/.htconfig.php ] &&
|
||||||
[ -f ${SOURCEDIR}/config/htconfig.php ] &&
|
[ -f ${SOURCEDIR}/config/htconfig.php ] &&
|
||||||
"$AUTOINSTALL" == "true"; then
|
"$AUTOINSTALL" == "true"; then
|
||||||
run_as "cp ${SOURCEDIR}/config/htconfig.php ${WORKDIR}/html/.htconfig.php"
|
run_as "cp ${SOURCEDIR}/config/htconfig.php ${WORKDIR}/.htconfig.php"
|
||||||
# TODO Pull Request for dba Change
|
|
||||||
run_as "sed -i 's/\s+\sDNS_CNAME//g' ${WORKDIR}/include/dba.php"
|
|
||||||
console "autoinstall -f .htconfig.php"
|
console "autoinstall -f .htconfig.php"
|
||||||
# TODO Workaround because of a strange permission issue
|
# TODO Workaround because of a strange permission issue
|
||||||
rm -fr ${WORKDIR}/view/smarty3/compiled
|
rm -fr ${WORKDIR}/view/smarty3/compiled
|
||||||
|
@ -213,10 +208,10 @@ if [ $# -eq 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
install) shift; install "$@";;
|
install) shift; install $@;;
|
||||||
update) shift; update "$@" ;;
|
update) shift; update $@ ;;
|
||||||
console) shift; console "$@" ;;
|
console) shift; console $@ ;;
|
||||||
composer) shift; composer "$@" ;;
|
composer) shift; composer $@ ;;
|
||||||
sendmail) shift; sendmail "$@" ;;
|
sendmail) shift; sendmail $@ ;;
|
||||||
*) friendica_help ;;
|
*) friendica_help ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -6,11 +6,15 @@
|
||||||
// Use environment variables for mysql if they are set beforehand
|
// Use environment variables for mysql if they are set beforehand
|
||||||
if (!empty(getenv('MYSQL_HOST'))
|
if (!empty(getenv('MYSQL_HOST'))
|
||||||
&& !empty(getenv('MYSQL_PORT'))
|
&& !empty(getenv('MYSQL_PORT'))
|
||||||
&& !empty(getenv('MYSQL_USERNAME'))
|
&& (!empty(getenv('MYSQL_USERNAME')) || !empty(getenv('MYSQL_USER')))
|
||||||
&& !empty(getenv('MYSQL_PASSWORD'))
|
&& !empty(getenv('MYSQL_PASSWORD'))
|
||||||
&& !empty(getenv('MYSQL_DATABASE'))) {
|
&& !empty(getenv('MYSQL_DATABASE'))) {
|
||||||
$db_host = getenv('MYSQL_HOST') . ':' . getenv('MYSQL_PORT');
|
$db_host = getenv('MYSQL_HOST') . ':' . getenv('MYSQL_PORT');
|
||||||
$db_user = getenv('MYSQL_USERNAME');
|
if (!empty(getenv('MYSQL_USERNAME'))) {
|
||||||
|
$db_user = getenv('MYSQL_USERNAME');
|
||||||
|
} elseif (!empty(getenv('MYSQL_USER'))) {
|
||||||
|
$db_user = getenv('MYSQL_USER');
|
||||||
|
}
|
||||||
$db_pass = getenv('MYSQL_PASSWORD');
|
$db_pass = getenv('MYSQL_PASSWORD');
|
||||||
$db_data = getenv('MYSQL_DATABASE');
|
$db_data = getenv('MYSQL_DATABASE');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue