2
0
Fork 0
mirror of https://github.com/friendica/docker synced 2024-06-25 19:26:04 +02:00

Merge pull request #23 from nupplaphil/bugfixings

Bugfixings
This commit is contained in:
Hypolite Petovan 2018-06-09 17:04:00 -04:00 committed by GitHub
commit 5c92c61d1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 81 additions and 69 deletions

View file

@ -141,7 +141,7 @@ copy_sources() {
fi fi
if version_greater "$image_version" "$installed_version" || if version_greater "$image_version" "$installed_version" ||
echo "$image_version" | grep -Eq '^.*\-dev'; then echo "$image_version" | grep -Eq '^.*\-dev|-rc'; then
if [ "$(id -u)" -eq 0 ]; then if [ "$(id -u)" -eq 0 ]; then
rsync_options="-rlDog --chown=www-data:root" rsync_options="-rlDog --chown=www-data:root"
else else
@ -149,11 +149,16 @@ copy_sources() {
fi fi
log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\'
rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' $SOURCEDIR/friendica/ $WORKDIR/
if [ -f $WORKDIR/view/smarty3 ]; then if [ -f $WORKDIR/view/smarty3 ]; then
chmod -R 777 $WORKDIR/view/smarty3 chmod -R 777 $WORKDIR/view/smarty3
fi fi
# the stable packages already have the whole vendor stuff in their images
if echo "$FRIENDICA_VERSION" | grep -Eq '^.*(\-dev|-rc)'; then
composer install
fi
fi fi
} }
@ -165,10 +170,9 @@ install() {
return return
fi fi
copy_sources
log 'Installing Friendica' log 'Installing Friendica'
composer install
copy_sources
if [ ! -f ${WORKDIR}/.htconfig.php ] && if [ ! -f ${WORKDIR}/.htconfig.php ] &&
[ -f ${SOURCEDIR}/config/htconfig.php ] && [ -f ${SOURCEDIR}/config/htconfig.php ] &&
@ -187,11 +191,10 @@ update() {
return return
fi fi
copy_sources
log 'Upgrading Friendica' log 'Upgrading Friendica'
composer install copy_sources
console dbstructure update console dbstructure update
} }

View file

@ -141,7 +141,7 @@ copy_sources() {
fi fi
if version_greater "$image_version" "$installed_version" || if version_greater "$image_version" "$installed_version" ||
echo "$image_version" | grep -Eq '^.*\-dev'; then echo "$image_version" | grep -Eq '^.*\-dev|-rc'; then
if [ "$(id -u)" -eq 0 ]; then if [ "$(id -u)" -eq 0 ]; then
rsync_options="-rlDog --chown=www-data:root" rsync_options="-rlDog --chown=www-data:root"
else else
@ -149,11 +149,16 @@ copy_sources() {
fi fi
log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\'
rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' $SOURCEDIR/friendica/ $WORKDIR/
if [ -f $WORKDIR/view/smarty3 ]; then if [ -f $WORKDIR/view/smarty3 ]; then
chmod -R 777 $WORKDIR/view/smarty3 chmod -R 777 $WORKDIR/view/smarty3
fi fi
# the stable packages already have the whole vendor stuff in their images
if echo "$FRIENDICA_VERSION" | grep -Eq '^.*(\-dev|-rc)'; then
composer install
fi
fi fi
} }
@ -165,10 +170,9 @@ install() {
return return
fi fi
copy_sources
log 'Installing Friendica' log 'Installing Friendica'
composer install
copy_sources
if [ ! -f ${WORKDIR}/.htconfig.php ] && if [ ! -f ${WORKDIR}/.htconfig.php ] &&
[ -f ${SOURCEDIR}/config/htconfig.php ] && [ -f ${SOURCEDIR}/config/htconfig.php ] &&
@ -187,11 +191,10 @@ update() {
return return
fi fi
copy_sources
log 'Upgrading Friendica' log 'Upgrading Friendica'
composer install copy_sources
console dbstructure update console dbstructure update
} }

View file

@ -6,6 +6,6 @@ while [ ! -f /var/www/html/.htconfig.php ]; do
done done
while true; do while true; do
php -f /var/www/html/scripts/worker.php php -f /var/www/html/bin/worker.php
sleep 10m sleep 10m
done done

View file

@ -141,7 +141,7 @@ copy_sources() {
fi fi
if version_greater "$image_version" "$installed_version" || if version_greater "$image_version" "$installed_version" ||
echo "$image_version" | grep -Eq '^.*\-dev'; then echo "$image_version" | grep -Eq '^.*\-dev|-rc'; then
if [ "$(id -u)" -eq 0 ]; then if [ "$(id -u)" -eq 0 ]; then
rsync_options="-rlDog --chown=www-data:root" rsync_options="-rlDog --chown=www-data:root"
else else
@ -149,11 +149,16 @@ copy_sources() {
fi fi
log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\'
rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' $SOURCEDIR/friendica/ $WORKDIR/
if [ -f $WORKDIR/view/smarty3 ]; then if [ -f $WORKDIR/view/smarty3 ]; then
chmod -R 777 $WORKDIR/view/smarty3 chmod -R 777 $WORKDIR/view/smarty3
fi fi
# the stable packages already have the whole vendor stuff in their images
if echo "$FRIENDICA_VERSION" | grep -Eq '^.*(\-dev|-rc)'; then
composer install
fi
fi fi
} }
@ -165,10 +170,9 @@ install() {
return return
fi fi
copy_sources
log 'Installing Friendica' log 'Installing Friendica'
composer install
copy_sources
if [ ! -f ${WORKDIR}/.htconfig.php ] && if [ ! -f ${WORKDIR}/.htconfig.php ] &&
[ -f ${SOURCEDIR}/config/htconfig.php ] && [ -f ${SOURCEDIR}/config/htconfig.php ] &&
@ -187,11 +191,10 @@ update() {
return return
fi fi
copy_sources
log 'Upgrading Friendica' log 'Upgrading Friendica'
composer install copy_sources
console dbstructure update console dbstructure update
} }

View file

@ -6,6 +6,6 @@ while [ ! -f /var/www/html/.htconfig.php ]; do
done done
while true; do while true; do
php -f /var/www/html/scripts/worker.php php -f /var/www/html/bin/worker.php
sleep 10m sleep 10m
done done

View file

@ -141,7 +141,7 @@ copy_sources() {
fi fi
if version_greater "$image_version" "$installed_version" || if version_greater "$image_version" "$installed_version" ||
echo "$image_version" | grep -Eq '^.*\-dev'; then echo "$image_version" | grep -Eq '^.*\-dev|-rc'; then
if [ "$(id -u)" -eq 0 ]; then if [ "$(id -u)" -eq 0 ]; then
rsync_options="-rlDog --chown=www-data:root" rsync_options="-rlDog --chown=www-data:root"
else else
@ -149,11 +149,16 @@ copy_sources() {
fi fi
log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\'
rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' $SOURCEDIR/friendica/ $WORKDIR/
if [ -f $WORKDIR/view/smarty3 ]; then if [ -f $WORKDIR/view/smarty3 ]; then
chmod -R 777 $WORKDIR/view/smarty3 chmod -R 777 $WORKDIR/view/smarty3
fi fi
# the stable packages already have the whole vendor stuff in their images
if echo "$FRIENDICA_VERSION" | grep -Eq '^.*(\-dev|-rc)'; then
composer install
fi
fi fi
} }
@ -165,10 +170,9 @@ install() {
return return
fi fi
copy_sources
log 'Installing Friendica' log 'Installing Friendica'
composer install
copy_sources
if [ ! -f ${WORKDIR}/.htconfig.php ] && if [ ! -f ${WORKDIR}/.htconfig.php ] &&
[ -f ${SOURCEDIR}/config/htconfig.php ] && [ -f ${SOURCEDIR}/config/htconfig.php ] &&
@ -187,11 +191,10 @@ update() {
return return
fi fi
copy_sources
log 'Upgrading Friendica' log 'Upgrading Friendica'
composer install copy_sources
console dbstructure update console dbstructure update
} }

View file

@ -6,6 +6,6 @@ while [ ! -f /var/www/html/.htconfig.php ]; do
done done
while true; do while true; do
php -f /var/www/html/scripts/worker.php php -f /var/www/html/bin/worker.php
sleep 10m sleep 10m
done done

View file

@ -141,7 +141,7 @@ copy_sources() {
fi fi
if version_greater "$image_version" "$installed_version" || if version_greater "$image_version" "$installed_version" ||
echo "$image_version" | grep -Eq '^.*\-dev'; then echo "$image_version" | grep -Eq '^.*\-dev|-rc'; then
if [ "$(id -u)" -eq 0 ]; then if [ "$(id -u)" -eq 0 ]; then
rsync_options="-rlDog --chown=www-data:root" rsync_options="-rlDog --chown=www-data:root"
else else
@ -149,11 +149,16 @@ copy_sources() {
fi fi
log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\'
rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' $SOURCEDIR/friendica/ $WORKDIR/
if [ -f $WORKDIR/view/smarty3 ]; then if [ -f $WORKDIR/view/smarty3 ]; then
chmod -R 777 $WORKDIR/view/smarty3 chmod -R 777 $WORKDIR/view/smarty3
fi fi
# the stable packages already have the whole vendor stuff in their images
if echo "$FRIENDICA_VERSION" | grep -Eq '^.*(\-dev|-rc)'; then
composer install
fi
fi fi
} }
@ -165,10 +170,9 @@ install() {
return return
fi fi
copy_sources
log 'Installing Friendica' log 'Installing Friendica'
composer install
copy_sources
if [ ! -f ${WORKDIR}/.htconfig.php ] && if [ ! -f ${WORKDIR}/.htconfig.php ] &&
[ -f ${SOURCEDIR}/config/htconfig.php ] && [ -f ${SOURCEDIR}/config/htconfig.php ] &&
@ -187,11 +191,10 @@ update() {
return return
fi fi
copy_sources
log 'Upgrading Friendica' log 'Upgrading Friendica'
composer install copy_sources
console dbstructure update console dbstructure update
} }

View file

@ -141,7 +141,7 @@ copy_sources() {
fi fi
if version_greater "$image_version" "$installed_version" || if version_greater "$image_version" "$installed_version" ||
echo "$image_version" | grep -Eq '^.*\-dev'; then echo "$image_version" | grep -Eq '^.*\-dev|-rc'; then
if [ "$(id -u)" -eq 0 ]; then if [ "$(id -u)" -eq 0 ]; then
rsync_options="-rlDog --chown=www-data:root" rsync_options="-rlDog --chown=www-data:root"
else else
@ -149,11 +149,16 @@ copy_sources() {
fi fi
log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\'
rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' $SOURCEDIR/friendica/ $WORKDIR/
if [ -f $WORKDIR/view/smarty3 ]; then if [ -f $WORKDIR/view/smarty3 ]; then
chmod -R 777 $WORKDIR/view/smarty3 chmod -R 777 $WORKDIR/view/smarty3
fi fi
# the stable packages already have the whole vendor stuff in their images
if echo "$FRIENDICA_VERSION" | grep -Eq '^.*(\-dev|-rc)'; then
composer install
fi
fi fi
} }
@ -165,10 +170,9 @@ install() {
return return
fi fi
copy_sources
log 'Installing Friendica' log 'Installing Friendica'
composer install
copy_sources
if [ ! -f ${WORKDIR}/.htconfig.php ] && if [ ! -f ${WORKDIR}/.htconfig.php ] &&
[ -f ${SOURCEDIR}/config/htconfig.php ] && [ -f ${SOURCEDIR}/config/htconfig.php ] &&
@ -187,11 +191,10 @@ update() {
return return
fi fi
copy_sources
log 'Upgrading Friendica' log 'Upgrading Friendica'
composer install copy_sources
console dbstructure update console dbstructure update
} }

View file

@ -141,7 +141,7 @@ copy_sources() {
fi fi
if version_greater "$image_version" "$installed_version" || if version_greater "$image_version" "$installed_version" ||
echo "$image_version" | grep -Eq '^.*\-dev'; then echo "$image_version" | grep -Eq '^.*\-dev|-rc'; then
if [ "$(id -u)" -eq 0 ]; then if [ "$(id -u)" -eq 0 ]; then
rsync_options="-rlDog --chown=www-data:root" rsync_options="-rlDog --chown=www-data:root"
else else
@ -149,11 +149,16 @@ copy_sources() {
fi fi
log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\'
rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' $SOURCEDIR/friendica/ $WORKDIR/
if [ -f $WORKDIR/view/smarty3 ]; then if [ -f $WORKDIR/view/smarty3 ]; then
chmod -R 777 $WORKDIR/view/smarty3 chmod -R 777 $WORKDIR/view/smarty3
fi fi
# the stable packages already have the whole vendor stuff in their images
if echo "$FRIENDICA_VERSION" | grep -Eq '^.*(\-dev|-rc)'; then
composer install
fi
fi fi
} }
@ -165,10 +170,9 @@ install() {
return return
fi fi
copy_sources
log 'Installing Friendica' log 'Installing Friendica'
composer install
copy_sources
if [ ! -f ${WORKDIR}/.htconfig.php ] && if [ ! -f ${WORKDIR}/.htconfig.php ] &&
[ -f ${SOURCEDIR}/config/htconfig.php ] && [ -f ${SOURCEDIR}/config/htconfig.php ] &&
@ -187,11 +191,10 @@ update() {
return return
fi fi
copy_sources
log 'Upgrading Friendica' log 'Upgrading Friendica'
composer install copy_sources
console dbstructure update console dbstructure update
} }

View file

@ -6,6 +6,6 @@ while [ ! -f /var/www/html/.htconfig.php ]; do
done done
while true; do while true; do
php -f /var/www/html/%%DIR%%/worker.php php -f /var/www/html/bin/worker.php
sleep 10m sleep 10m
done done

View file

@ -32,11 +32,6 @@ declare -A install_extras=(
['develop']='' ['develop']=''
) )
declare -A bin_dir=(
['stable']='scripts'
['develop']='bin'
)
variants=( variants=(
apache apache
fpm fpm
@ -91,10 +86,6 @@ function create_variant() {
# Copy the bin directory # Copy the bin directory
cp -rT .bin "$dir/bin" cp -rT .bin "$dir/bin"
sed -ri -e '
s/%%DIR%%/'"${bin_dir[$install_type]}"'/g;
' "$dir/cron.sh"
travisEnvAmd64='\n - env: VERSION='"$1"' VARIANT='"$variant"' ARCH=amd64'"$travisEnvAmd64" travisEnvAmd64='\n - env: VERSION='"$1"' VARIANT='"$variant"' ARCH=amd64'"$travisEnvAmd64"
for arch in i386 amd64; do for arch in i386 amd64; do
travisEnv='\n - env: VERSION='"$1"' VARIANT='"$variant"' ARCH='"$arch$travisEnv" travisEnv='\n - env: VERSION='"$1"' VARIANT='"$variant"' ARCH='"$arch$travisEnv"