2
0
Fork 0
mirror of https://github.com/friendica/docker synced 2024-05-24 18:14:57 +02:00

Merge pull request #68 from nupplaphil/overwrite_repo_branch

Add possibility to overwrite git Repo&branch
This commit is contained in:
Hypolite Petovan 2019-06-27 13:21:16 -04:00 committed by GitHub
commit 80ce1b5b89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 102 additions and 63 deletions

View file

@ -19,6 +19,8 @@ version_greater() {
clone_develop() {
friendica_git="${FRIENDICA_VERSION}"
addons_git="${FRIENDICA_ADDONS}"
friendica_repo="${FRIENDICA_REPOSITORY:-friendica/friendica}"
friendica_addons_repo="${FRIENDICA_ADDONS_REPO:-friendica/friendica-addons}"
if echo "{$friendica_git,,}" | grep -Eq '^.*\-dev'; then
friendica_git="develop"
@ -28,17 +30,22 @@ clone_develop() {
addons_git="develop"
fi
echo "Downloading Friendica from GitHub '${friendica_git}' ..."
echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..."
# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "git clone -q -b ${friendica_git} https://github.com/friendica/friendica /usr/src/friendica"
sh -c "git clone -q -b ${friendica_git} https://github.com/${friendica_repo} /usr/src/friendica"
mkdir /usr/src/friendica/addon
sh -c "git clone -q -b ${addons_git} https://github.com/friendica/friendica-addons /usr/src/friendica/addon"
sh -c "git clone -q -b ${addons_git} https://github.com/${friendica_addons_repo} /usr/src/friendica/addon"
echo "Download finished"
if [ ! -f /usr/src/friendica/VERSION ]; then
echo "Couldn't clone repository"
exit 1
fi
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
}
@ -84,13 +91,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
check=false
# cloning from git is just possible for develop or Release Candidats
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)'; then
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
# just clone & check if it's a new install or upgrade
if [ "$installed_version" = "0.0.0.0" ] || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
fi
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
else
image_version="$(cat /usr/src/friendica/VERSION)"

View file

@ -19,6 +19,8 @@ version_greater() {
clone_develop() {
friendica_git="${FRIENDICA_VERSION}"
addons_git="${FRIENDICA_ADDONS}"
friendica_repo="${FRIENDICA_REPOSITORY:-friendica/friendica}"
friendica_addons_repo="${FRIENDICA_ADDONS_REPO:-friendica/friendica-addons}"
if echo "{$friendica_git,,}" | grep -Eq '^.*\-dev'; then
friendica_git="develop"
@ -28,17 +30,22 @@ clone_develop() {
addons_git="develop"
fi
echo "Downloading Friendica from GitHub '${friendica_git}' ..."
echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..."
# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "git clone -q -b ${friendica_git} https://github.com/friendica/friendica /usr/src/friendica"
sh -c "git clone -q -b ${friendica_git} https://github.com/${friendica_repo} /usr/src/friendica"
mkdir /usr/src/friendica/addon
sh -c "git clone -q -b ${addons_git} https://github.com/friendica/friendica-addons /usr/src/friendica/addon"
sh -c "git clone -q -b ${addons_git} https://github.com/${friendica_addons_repo} /usr/src/friendica/addon"
echo "Download finished"
if [ ! -f /usr/src/friendica/VERSION ]; then
echo "Couldn't clone repository"
exit 1
fi
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
}
@ -84,13 +91,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
check=false
# cloning from git is just possible for develop or Release Candidats
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)'; then
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
# just clone & check if it's a new install or upgrade
if [ "$installed_version" = "0.0.0.0" ] || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
fi
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
else
image_version="$(cat /usr/src/friendica/VERSION)"

View file

@ -19,6 +19,8 @@ version_greater() {
clone_develop() {
friendica_git="${FRIENDICA_VERSION}"
addons_git="${FRIENDICA_ADDONS}"
friendica_repo="${FRIENDICA_REPOSITORY:-friendica/friendica}"
friendica_addons_repo="${FRIENDICA_ADDONS_REPO:-friendica/friendica-addons}"
if echo "{$friendica_git,,}" | grep -Eq '^.*\-dev'; then
friendica_git="develop"
@ -28,17 +30,22 @@ clone_develop() {
addons_git="develop"
fi
echo "Downloading Friendica from GitHub '${friendica_git}' ..."
echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..."
# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "git clone -q -b ${friendica_git} https://github.com/friendica/friendica /usr/src/friendica"
sh -c "git clone -q -b ${friendica_git} https://github.com/${friendica_repo} /usr/src/friendica"
mkdir /usr/src/friendica/addon
sh -c "git clone -q -b ${addons_git} https://github.com/friendica/friendica-addons /usr/src/friendica/addon"
sh -c "git clone -q -b ${addons_git} https://github.com/${friendica_addons_repo} /usr/src/friendica/addon"
echo "Download finished"
if [ ! -f /usr/src/friendica/VERSION ]; then
echo "Couldn't clone repository"
exit 1
fi
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
}
@ -84,13 +91,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
check=false
# cloning from git is just possible for develop or Release Candidats
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)'; then
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
# just clone & check if it's a new install or upgrade
if [ "$installed_version" = "0.0.0.0" ] || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
fi
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
else
image_version="$(cat /usr/src/friendica/VERSION)"

View file

@ -19,6 +19,8 @@ version_greater() {
clone_develop() {
friendica_git="${FRIENDICA_VERSION}"
addons_git="${FRIENDICA_ADDONS}"
friendica_repo="${FRIENDICA_REPOSITORY:-friendica/friendica}"
friendica_addons_repo="${FRIENDICA_ADDONS_REPO:-friendica/friendica-addons}"
if echo "{$friendica_git,,}" | grep -Eq '^.*\-dev'; then
friendica_git="develop"
@ -28,17 +30,22 @@ clone_develop() {
addons_git="develop"
fi
echo "Downloading Friendica from GitHub '${friendica_git}' ..."
echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..."
# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "git clone -q -b ${friendica_git} https://github.com/friendica/friendica /usr/src/friendica"
sh -c "git clone -q -b ${friendica_git} https://github.com/${friendica_repo} /usr/src/friendica"
mkdir /usr/src/friendica/addon
sh -c "git clone -q -b ${addons_git} https://github.com/friendica/friendica-addons /usr/src/friendica/addon"
sh -c "git clone -q -b ${addons_git} https://github.com/${friendica_addons_repo} /usr/src/friendica/addon"
echo "Download finished"
if [ ! -f /usr/src/friendica/VERSION ]; then
echo "Couldn't clone repository"
exit 1
fi
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
}
@ -84,13 +91,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
check=false
# cloning from git is just possible for develop or Release Candidats
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)'; then
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
# just clone & check if it's a new install or upgrade
if [ "$installed_version" = "0.0.0.0" ] || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
fi
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
else
image_version="$(cat /usr/src/friendica/VERSION)"

View file

@ -19,6 +19,8 @@ version_greater() {
clone_develop() {
friendica_git="${FRIENDICA_VERSION}"
addons_git="${FRIENDICA_ADDONS}"
friendica_repo="${FRIENDICA_REPOSITORY:-friendica/friendica}"
friendica_addons_repo="${FRIENDICA_ADDONS_REPO:-friendica/friendica-addons}"
if echo "{$friendica_git,,}" | grep -Eq '^.*\-dev'; then
friendica_git="develop"
@ -28,17 +30,22 @@ clone_develop() {
addons_git="develop"
fi
echo "Downloading Friendica from GitHub '${friendica_git}' ..."
echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..."
# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "git clone -q -b ${friendica_git} https://github.com/friendica/friendica /usr/src/friendica"
sh -c "git clone -q -b ${friendica_git} https://github.com/${friendica_repo} /usr/src/friendica"
mkdir /usr/src/friendica/addon
sh -c "git clone -q -b ${addons_git} https://github.com/friendica/friendica-addons /usr/src/friendica/addon"
sh -c "git clone -q -b ${addons_git} https://github.com/${friendica_addons_repo} /usr/src/friendica/addon"
echo "Download finished"
if [ ! -f /usr/src/friendica/VERSION ]; then
echo "Couldn't clone repository"
exit 1
fi
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
}
@ -84,13 +91,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
check=false
# cloning from git is just possible for develop or Release Candidats
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)'; then
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
# just clone & check if it's a new install or upgrade
if [ "$installed_version" = "0.0.0.0" ] || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
fi
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
else
image_version="$(cat /usr/src/friendica/VERSION)"

View file

@ -19,6 +19,8 @@ version_greater() {
clone_develop() {
friendica_git="${FRIENDICA_VERSION}"
addons_git="${FRIENDICA_ADDONS}"
friendica_repo="${FRIENDICA_REPOSITORY:-friendica/friendica}"
friendica_addons_repo="${FRIENDICA_ADDONS_REPO:-friendica/friendica-addons}"
if echo "{$friendica_git,,}" | grep -Eq '^.*\-dev'; then
friendica_git="develop"
@ -28,17 +30,22 @@ clone_develop() {
addons_git="develop"
fi
echo "Downloading Friendica from GitHub '${friendica_git}' ..."
echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..."
# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "git clone -q -b ${friendica_git} https://github.com/friendica/friendica /usr/src/friendica"
sh -c "git clone -q -b ${friendica_git} https://github.com/${friendica_repo} /usr/src/friendica"
mkdir /usr/src/friendica/addon
sh -c "git clone -q -b ${addons_git} https://github.com/friendica/friendica-addons /usr/src/friendica/addon"
sh -c "git clone -q -b ${addons_git} https://github.com/${friendica_addons_repo} /usr/src/friendica/addon"
echo "Download finished"
if [ ! -f /usr/src/friendica/VERSION ]; then
echo "Couldn't clone repository"
exit 1
fi
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
}
@ -84,13 +91,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
check=false
# cloning from git is just possible for develop or Release Candidats
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)'; then
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
# just clone & check if it's a new install or upgrade
if [ "$installed_version" = "0.0.0.0" ] || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
fi
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
else
image_version="$(cat /usr/src/friendica/VERSION)"

View file

@ -19,6 +19,8 @@ version_greater() {
clone_develop() {
friendica_git="${FRIENDICA_VERSION}"
addons_git="${FRIENDICA_ADDONS}"
friendica_repo="${FRIENDICA_REPOSITORY:-friendica/friendica}"
friendica_addons_repo="${FRIENDICA_ADDONS_REPO:-friendica/friendica-addons}"
if echo "{$friendica_git,,}" | grep -Eq '^.*\-dev'; then
friendica_git="develop"
@ -28,17 +30,22 @@ clone_develop() {
addons_git="develop"
fi
echo "Downloading Friendica from GitHub '${friendica_git}' ..."
echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..."
# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "git clone -q -b ${friendica_git} https://github.com/friendica/friendica /usr/src/friendica"
sh -c "git clone -q -b ${friendica_git} https://github.com/${friendica_repo} /usr/src/friendica"
mkdir /usr/src/friendica/addon
sh -c "git clone -q -b ${addons_git} https://github.com/friendica/friendica-addons /usr/src/friendica/addon"
sh -c "git clone -q -b ${addons_git} https://github.com/${friendica_addons_repo} /usr/src/friendica/addon"
echo "Download finished"
if [ ! -f /usr/src/friendica/VERSION ]; then
echo "Couldn't clone repository"
exit 1
fi
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
}
@ -84,13 +91,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
check=false
# cloning from git is just possible for develop or Release Candidats
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)'; then
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
# just clone & check if it's a new install or upgrade
if [ "$installed_version" = "0.0.0.0" ] || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
fi
clone_develop
image_version="$(cat /usr/src/friendica/VERSION)"
check=true
else
image_version="$(cat /usr/src/friendica/VERSION)"

View file

@ -82,6 +82,10 @@ There are three options to enable the cron-job for Friendica:
**Develop/Release Candidat Settings**
- `FRIENDICA_UPGRADE` If set to `true`, a develop or release candidat node will get updated at startup.
- `FRIENDICA_REPOSITORY` If set, a custom repository will be chosen (Default: `friendica`)
- `FRIENDICA_ADDONS_REPO` If set, a custom repository for the addons will be chosen (Default: `friendica`)
- `FRIENDICA_VERSION` If set, a custom branch will be chosen (Default is based on the chosen image version)
- `FRIENDICA_ADDONS` If set, a custom branch for the addons will be chosen (Default is based on the chosen image version)
## Administrator account