mirror of
https://github.com/friendica/docker
synced 2024-12-29 12:52:11 +01:00
Merge pull request #45 from nupplaphil/docker-38
Switch to local.config.php
This commit is contained in:
commit
03942d0de0
45 changed files with 174 additions and 157 deletions
23
.docker-files/README.md
Normal file
23
.docker-files/README.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Docker Files
|
||||
This files are directly load to the docker image's root directory.
|
||||
Any files except `*.sh` and `*.exclude` will get ignored during the repository upgrade.
|
||||
|
||||
## `entrypoint.sh`
|
||||
This file is the default entrypoint of each start of Friendica.
|
||||
It automatically checks the following things:
|
||||
|
||||
- If the image is for a develop or Release candidate, checkout the latest sources from github if necessary
|
||||
- Setup the SMTP settings for SSMTP
|
||||
- Check if an upgrade is necessary (due to new checkout or because of a new version)
|
||||
- Check if it's a fresh installation and initialize Friendica
|
||||
- Check if auto install is set and execute the auto-installer
|
||||
- Read all environment variables and combine them with `local.config.php`
|
||||
|
||||
## `cron.sh`
|
||||
This file is for overwriting the default entrypoint.
|
||||
It starts the daemon of the current Friendica instance.
|
||||
|
||||
**Warning** Currently only **one** daemon service is allowed to run!
|
||||
|
||||
## `upgrade.exclude`
|
||||
Contains all files to exclude during an upgrade or a fresh installation of Friendica (f.e. `local.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,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
|
2
.gitattributes
vendored
2
.gitattributes
vendored
|
@ -1,2 +0,0 @@
|
|||
# Disable LF normalization for all files
|
||||
* -text
|
20
.gitignore
vendored
20
.gitignore
vendored
|
@ -1,20 +0,0 @@
|
|||
favicon.*
|
||||
\#*
|
||||
*.log
|
||||
*.out
|
||||
*.version*
|
||||
favicon.*
|
||||
*~
|
||||
robots.txt
|
||||
|
||||
|
||||
#ignore config files from eclipse, we don't want IDE files in our repository
|
||||
.project
|
||||
.buildpath
|
||||
.externalToolBuilders
|
||||
.settings
|
||||
#ignore OSX .DS_Store files
|
||||
.DS_Store
|
||||
|
||||
#ignore config files from JetBrains
|
||||
/.idea
|
|
@ -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
|
|
@ -10,28 +10,14 @@ Never ever change a file/folder inside a directory without a `.` at the beginnin
|
|||
This folder will get updated automatically based on the templates you want to change.
|
||||
All changes in such folders will get overwritten during an update.
|
||||
|
||||
# Basic files and folders
|
||||
|
||||
Most of the time you want to change one of the followed files.
|
||||
|
||||
## Templates & shell-scripts
|
||||
|
||||
- If you want to update/upgrade Dockerfiles, use the right `*.template` file for it.
|
||||
- If you want to update/change the behavior of **every** start of Docker-image, change `docker-entrypoint.sh`
|
||||
- If you want to update/change the behavior how cronjobs will get started, change `docker-cron.sh`
|
||||
|
||||
# Maintenance scripts
|
||||
|
||||
There are two important scripts in this repository for maintenance.
|
||||
|
||||
## update.sh
|
||||
# `update.sh`
|
||||
|
||||
Creates a directory and the necessary files for each combination of version (2018.05-rc, 3.6, ...) and variant (apache, fpm, fpm-alpine):
|
||||
|
||||
- Creating the right `Dockerfile` (from one of the two *.template files)
|
||||
- Creating the `docker-*.sh` files (copy as *.sh)
|
||||
- Coping `/.bin/*` to `bin/*`
|
||||
- Coping `/.config/*` to `config/*`
|
||||
- Copy each shell and *.exclude file in `.docker-files/`
|
||||
- Recreating the version/variant environment in `.travis.yml`
|
||||
|
||||
If you want to update the Docker-images to a newer version, just change the list in `update.sh` at
|
||||
|
@ -41,7 +27,7 @@ versions=(
|
|||
)
|
||||
```
|
||||
|
||||
# generate-stackbrew-library.sh
|
||||
# `generate-stackbrew-library.sh`
|
||||
|
||||
This file automatically creates a "manifest" for the docker-images.
|
||||
Like:
|
||||
|
@ -66,4 +52,12 @@ Architectures: amd64, arm32v6, arm64v8, i386, ppc64le, s390x
|
|||
GitCommit: b46fae917321394e1482df59dc4e39daffbe5c59
|
||||
Directory: 2018.05-rc/fpm-alpine
|
||||
This is the input-file for the official-images in a later step :-)
|
||||
```
|
||||
```
|
||||
|
||||
# `build_and_push.sh`
|
||||
|
||||
This file automatically builds and publish all docker image variants (apache, fpm, ...) and versions (stable, latest, dev, ...)
|
||||
|
||||
It uses [bashbrew](https://github.com/docker-library/official-images/tree/master/bashbrew) for building and publishing and `generate-stackbrew-library.sh` for the definition (manifest) what to build and publish.
|
||||
|
||||
See [Instruction format](https://github.com/docker-library/official-images/blob/master/README.md#instruction-format) for more background information.
|
|
@ -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
|
||||
|
||||
|
|
14
update.sh
14
update.sh
|
@ -80,14 +80,16 @@ function create_variant() {
|
|||
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
|
||||
' "$dir/Dockerfile"
|
||||
|
||||
# Copy the shell scripts
|
||||
for name in entrypoint cron; do
|
||||
cp "docker-$name.sh" "$dir/$name.sh"
|
||||
# Copy the .docker-files to the directories (excluding README.md)
|
||||
for name in ".docker-files"/*; do
|
||||
# Don't copy the README of any directory
|
||||
if [[ "$name" == *.sh || "$name" == *.exclude ]]; then
|
||||
file=${name#".docker-files"}
|
||||
mkdir -p $(dirname $dir/$file)
|
||||
cp -r "$name" "$dir/$file"
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy the upgrade.exclude
|
||||
cp upgrade.exclude "$dir/"
|
||||
|
||||
travisEnvAmd64='\n - env: VERSION='"$1"' VARIANT='"$variant"' ARCH=amd64'"$travisEnvAmd64"
|
||||
for arch in i386 amd64; do
|
||||
travisEnv='\n - env: VERSION='"$1"' VARIANT='"$variant"' ARCH='"$arch$travisEnv"
|
||||
|
|
Loading…
Reference in a new issue