mirror of
https://github.com/YunoHost-Apps/vikunja_ynh.git
synced 2024-09-03 18:06:26 +02:00
Bump to v0.23, that has a single source
This commit is contained in:
parent
fe35941c2f
commit
7926be50c7
9 changed files with 57 additions and 109 deletions
|
@ -1,18 +1,9 @@
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
|
|
||||||
# Path to source
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
alias __INSTALL_DIR__/;
|
client_max_body_size 20M;
|
||||||
|
|
||||||
try_files $uri $uri/ /;
|
|
||||||
|
|
||||||
index index.html index.htm;
|
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^/(api|dav|\.well-known)/ {
|
|
||||||
proxy_pass http://127.0.0.1:__PORT__;
|
|
||||||
client_max_body_size 20M;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
|
||||||
|
|
||||||
packaging_format = 2
|
packaging_format = 2
|
||||||
|
|
||||||
id = "vikunja"
|
id = "vikunja"
|
||||||
|
@ -5,7 +7,7 @@ name = "Vikunja"
|
||||||
description.en = "Self-hosted To-Do list application"
|
description.en = "Self-hosted To-Do list application"
|
||||||
description.fr = "Application de liste de tâches auto-hébergée"
|
description.fr = "Application de liste de tâches auto-hébergée"
|
||||||
|
|
||||||
version = "0.22.1~ynh1"
|
version = "0.23.0~ynh1"
|
||||||
|
|
||||||
maintainers = []
|
maintainers = []
|
||||||
|
|
||||||
|
@ -49,31 +51,24 @@ ram.runtime = "50M"
|
||||||
[resources]
|
[resources]
|
||||||
|
|
||||||
[resources.sources]
|
[resources.sources]
|
||||||
[resources.sources.back]
|
[resources.sources.main]
|
||||||
arm64.url = "https://dl.vikunja.io/api/0.22.1/vikunja-v0.22.1-linux-arm64-full.zip"
|
arm64.url = "https://dl.vikunja.io/vikunja/0.23.0/vikunja-v0.23.0-linux-arm64-full.zip"
|
||||||
arm64.sha256 = "50a1670c0fde858c1cd7bc72cc670c4011a688a20b07ee62fab11bcca3eab01e"
|
arm64.sha256 = "50a1670c0fde858c1cd7bc72cc670c4011a688a20b07ee62fab11bcca3eab01e"
|
||||||
amd64.url = "https://dl.vikunja.io/api/0.22.1/vikunja-v0.22.1-linux-amd64-full.zip"
|
amd64.url = "https://dl.vikunja.io/vikunja/0.23.0/vikunja-v0.23.0-linux-amd64-full.zip"
|
||||||
amd64.sha256 = "c3e21ca5ccace3f9eaa423bab8c1cfc3e7de15d5c593db0aa6e4dbd9883469e6"
|
amd64.sha256 = "c3e21ca5ccace3f9eaa423bab8c1cfc3e7de15d5c593db0aa6e4dbd9883469e6"
|
||||||
armhf.url = "https://dl.vikunja.io/api/0.22.1/vikunja-v0.22.1-linux-arm-7-full.zip"
|
armhf.url = "https://dl.vikunja.io/vikunja/0.23.0/vikunja-v0.23.0-linux-arm-7-full.zip"
|
||||||
armhf.sha256 = "72f50404df57d75060bdd0d162e12cba20269a0def7b38993e1b61c4cf3d69d2"
|
armhf.sha256 = "72f50404df57d75060bdd0d162e12cba20269a0def7b38993e1b61c4cf3d69d2"
|
||||||
i386.url = "https://dl.vikunja.io/api/0.22.1/vikunja-v0.22.1-linux-386-full.zip"
|
i386.url = "https://dl.vikunja.io/vikunja/0.23.0/vikunja-v0.23.0-linux-386-full.zip"
|
||||||
i386.sha256 = "de1e271b6d3fe6024b790b95c1bf946a415598b31192638ef85589cd2c35f996"
|
i386.sha256 = "de1e271b6d3fe6024b790b95c1bf946a415598b31192638ef85589cd2c35f996"
|
||||||
in_subdir = false
|
in_subdir = false
|
||||||
format = "zip"
|
format = "zip"
|
||||||
autoupdate.upstream = "https://kolaente.dev/vikunja/vikunja"
|
|
||||||
autoupdate.strategy = "latest_gitea_release"
|
autoupdate.strategy = "latest_gitea_release"
|
||||||
autoupdate.asset.amd64 = "tarball"
|
autoupdate.asset.amd64 = "tarball"
|
||||||
autoupdate.asset.i386 = "tarball"
|
autoupdate.asset.i386 = "tarball"
|
||||||
autoupdate.asset.arm64 = "tarball"
|
autoupdate.asset.arm64 = "tarball"
|
||||||
autoupdate.asset.armhf = "tarball"
|
autoupdate.asset.armhf = "tarball"
|
||||||
|
|
||||||
[resources.sources.front]
|
|
||||||
url = "https://dl.vikunja.io/frontend/vikunja-frontend-0.22.1.zip"
|
|
||||||
sha256 = "8e4145eacb9c2d95a95a43dca2f4dd0fd30ec8934f4562017caf77f3c5f9a277"
|
|
||||||
in_subdir = false
|
|
||||||
format = "zip"
|
|
||||||
|
|
||||||
|
|
||||||
[resources.ports]
|
[resources.ports]
|
||||||
|
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
|
|
@ -21,9 +21,6 @@ ynh_print_info --message="Declaring files to be backed up..."
|
||||||
# Frontend
|
# Frontend
|
||||||
ynh_backup --src_path="$install_dir"
|
ynh_backup --src_path="$install_dir"
|
||||||
|
|
||||||
# Backend
|
|
||||||
ynh_backup --src_path="$backend_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# BACKUP THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -40,9 +40,9 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
domain="$new_domain"
|
domain="$new_domain"
|
||||||
path="$new_path"
|
path="$new_path"
|
||||||
ynh_add_config --template="../conf/config.yml" --destination="$backend_path/config.yml"
|
ynh_add_config --template="../conf/config.yml" --destination="$install_dir/config.yml"
|
||||||
|
|
||||||
chmod 600 "$backend_path/config.yml"
|
chmod 600 "$install_dir/config.yml"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALISATION
|
# GENERIC FINALISATION
|
||||||
|
|
|
@ -16,7 +16,6 @@ source /usr/share/yunohost/helpers
|
||||||
timezone="$(cat /etc/timezone)"
|
timezone="$(cat /etc/timezone)"
|
||||||
secret=$(ynh_string_random --length=32)
|
secret=$(ynh_string_random --length=32)
|
||||||
redis_db=$(ynh_redis_get_free_db)
|
redis_db=$(ynh_redis_get_free_db)
|
||||||
backend_path=/opt/$app
|
|
||||||
|
|
||||||
set_motd=""
|
set_motd=""
|
||||||
enable_registration="true"
|
enable_registration="true"
|
||||||
|
@ -32,7 +31,6 @@ maxitemsperpage=50
|
||||||
# STORE SETTINGS FROM MANIFEST
|
# STORE SETTINGS FROM MANIFEST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=backend_path --value=$backend_path
|
|
||||||
ynh_app_setting_set --app=$app --key=set_motd --value=$set_motd
|
ynh_app_setting_set --app=$app --key=set_motd --value=$set_motd
|
||||||
ynh_app_setting_set --app=$app --key=enable_registration --value=$enable_registration
|
ynh_app_setting_set --app=$app --key=enable_registration --value=$enable_registration
|
||||||
ynh_app_setting_set --app=$app --key=enable_linksharing --value=$enable_linksharing
|
ynh_app_setting_set --app=$app --key=enable_linksharing --value=$enable_linksharing
|
||||||
|
@ -44,31 +42,29 @@ ynh_app_setting_set --app=$app --key=maxavatarsize --value=$maxavatarsize
|
||||||
ynh_app_setting_set --app=$app --key=maxitemsperpage --value=$maxitemsperpage
|
ynh_app_setting_set --app=$app --key=maxitemsperpage --value=$maxitemsperpage
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL FRONTEND
|
# INSTALL BACKEND
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up frontend..." --weight=1
|
ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$install_dir" --source_id="front"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
executable="$(find $tempdir -name "vikunja-*" \! -name "*.sha256")"
|
||||||
|
ln -s "$executable" "$install_dir/vikunja"
|
||||||
|
|
||||||
|
chmod +x "$install_dir/vikunja"
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL BACKEND
|
# ADD A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up backend..." --weight=1
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
ynh_add_config --template="config.yml" --destination="$install_dir/config.yml"
|
||||||
mkdir -p "$backend_path"
|
|
||||||
mkdir -p "$backend_path/files"
|
|
||||||
tempdir="$(mktemp -d)"
|
|
||||||
ynh_setup_source --dest_dir=$tempdir --source_id="back"
|
|
||||||
back="$(find $tempdir -name "vikunja-*" \! -name "*.sha256")"
|
|
||||||
cp "$back" "$backend_path/vikunja"
|
|
||||||
|
|
||||||
chmod +x "$backend_path/vikunja"
|
chmod 400 "$install_dir/config.yml"
|
||||||
chown -R $app:www-data "$backend_path/files"
|
chown "$app:$app" "$install_dir/config.yml"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
|
@ -81,23 +77,13 @@ ynh_add_systemd_config
|
||||||
|
|
||||||
yunohost service add $app --description="Self-hosted To-Do list application" --log="/var/log/$app/$app.log"
|
yunohost service add $app --description="Self-hosted To-Do list application" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# ADD A CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
|
||||||
|
|
||||||
ynh_add_config --template="config.yml" --destination="$backend_path/config.yml"
|
|
||||||
|
|
||||||
chmod 400 "$backend_path/config.yml"
|
|
||||||
chown $app:$app "$backend_path/config.yml"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
ynh_script_progression --message="Starting $app's systemd service..." --weight=2
|
||||||
|
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd #--line_match="server started on"
|
ynh_systemd_action --service_name="$app" --action=start --log_path=systemd #--line_match="server started on"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -28,9 +28,6 @@ ynh_remove_systemd_config
|
||||||
|
|
||||||
ynh_redis_remove_db "$redis_db"
|
ynh_redis_remove_db "$redis_db"
|
||||||
|
|
||||||
# Remove backend
|
|
||||||
ynh_secure_remove --file="$backend_path"
|
|
||||||
|
|
||||||
# Remove the dedicated NGINX config
|
# Remove the dedicated NGINX config
|
||||||
ynh_remove_nginx_config
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
|
|
|
@ -16,14 +16,9 @@ ynh_script_progression --message="Restoring $app main directory..." --weight=4
|
||||||
|
|
||||||
# Frontend
|
# Frontend
|
||||||
ynh_restore_file --origin_path="$install_dir"
|
ynh_restore_file --origin_path="$install_dir"
|
||||||
chmod 750 "$install_dir"
|
|
||||||
chmod -R o-rwx "$install_dir"
|
|
||||||
chown -R $app:www-data "$install_dir"
|
|
||||||
|
|
||||||
# Backend
|
chmod -R o-rwx "$install_dir"
|
||||||
ynh_restore_file --origin_path="$backend_path"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
chmod +x "$backend_path/vikunja"
|
|
||||||
chown -R $app:www-data "$backend_path/files"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE POSTGRESQL DATABASE
|
# RESTORE THE POSTGRESQL DATABASE
|
||||||
|
|
|
@ -17,71 +17,65 @@ timezone="$(cat /etc/timezone)"
|
||||||
secret=$(ynh_string_random --length=32)
|
secret=$(ynh_string_random --length=32)
|
||||||
redis_db=$(ynh_redis_get_free_db)
|
redis_db=$(ynh_redis_get_free_db)
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK VERSION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
|
|
||||||
# If backend_path doesn't exist, create it
|
|
||||||
if [ -z "${backend_path:-}" ]; then
|
|
||||||
backend_path=/opt/$app
|
|
||||||
ynh_app_setting_set --app=$app --key=backend_path --value=$backend_path
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${set_motd:-}" ]; then
|
if [ -z "${set_motd:-}" ]; then
|
||||||
set_motd=""
|
set_motd=""
|
||||||
ynh_app_setting_set --app=$app --key=set_motd --value=$set_motd
|
ynh_app_setting_set --app="$app" --key="set_motd" --value="$set_motd"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${enable_registration:-}" ]; then
|
if [ -z "${enable_registration:-}" ]; then
|
||||||
enable_registration="true"
|
enable_registration="true"
|
||||||
ynh_app_setting_set --app=$app --key=enable_registration --value=$enable_registration
|
ynh_app_setting_set --app="$app" --key="enable_registration" --value="$enable_registration"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${enable_linksharing:-}" ]; then
|
if [ -z "${enable_linksharing:-}" ]; then
|
||||||
enable_linksharing="true"
|
enable_linksharing="true"
|
||||||
ynh_app_setting_set --app=$app --key=enable_linksharing --value=$enable_linksharing
|
ynh_app_setting_set --app="$app" --key="enable_linksharing" --value="$enable_linksharing"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${enable_taskattachments:-}" ]; then
|
if [ -z "${enable_taskattachments:-}" ]; then
|
||||||
enable_taskattachments="true"
|
enable_taskattachments="true"
|
||||||
ynh_app_setting_set --app=$app --key=enable_taskattachments --value=$enable_taskattachments
|
ynh_app_setting_set --app="$app" --key="enable_taskattachments" --value="$enable_taskattachments"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${enable_taskcomments:-}" ]; then
|
if [ -z "${enable_taskcomments:-}" ]; then
|
||||||
enable_taskcomments="true"
|
enable_taskcomments="true"
|
||||||
ynh_app_setting_set --app=$app --key=enable_taskcomments --value=$enable_taskcomments
|
ynh_app_setting_set --app="$app" --key="enable_taskcomments" --value="$enable_taskcomments"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${enable_emailreminders:-}" ]; then
|
if [ -z "${enable_emailreminders:-}" ]; then
|
||||||
enable_emailreminders="true"
|
enable_emailreminders="true"
|
||||||
ynh_app_setting_set --app=$app --key=enable_emailreminders --value=$enable_emailreminders
|
ynh_app_setting_set --app="$app" --key="enable_emailreminders" --value="$enable_emailreminders"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${enable_userdeletion:-}" ]; then
|
if [ -z "${enable_userdeletion:-}" ]; then
|
||||||
enable_userdeletion="true"
|
enable_userdeletion="true"
|
||||||
ynh_app_setting_set --app=$app --key=enable_userdeletion --value=$enable_userdeletion
|
ynh_app_setting_set --app="$app" --key="enable_userdeletion" --value="$enable_userdeletion"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${maxavatarsize:-}" ]; then
|
if [ -z "${maxavatarsize:-}" ]; then
|
||||||
maxavatarsize=1024
|
maxavatarsize=1024
|
||||||
ynh_app_setting_set --app=$app --key=maxavatarsize --value=$maxavatarsize
|
ynh_app_setting_set --app="$app" --key="maxavatarsize" --value="$maxavatarsize"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${maxitemsperpage:-}" ]; then
|
if [ -z "${maxitemsperpage:-}" ]; then
|
||||||
maxitemsperpage=50
|
maxitemsperpage=50
|
||||||
ynh_app_setting_set --app=$app --key=maxitemsperpage --value=$maxitemsperpage
|
ynh_app_setting_set --app="$app" --key="maxitemsperpage" --value="$maxitemsperpage"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${language:-}" ]; then
|
if [ -z "${language:-}" ]; then
|
||||||
language="en"
|
language="en"
|
||||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
ynh_app_setting_set --app="$app" --key="language" --value="$language"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ynh_compare_current_package_version --comparison lt --version "0.23.0~ynh1"; then
|
||||||
|
mv "$backend_path/config.yml" "$install_dir/config.yml"
|
||||||
|
ynh_secure_remove "$backend_path"
|
||||||
|
ynh_app_setting_delete --app="$app" --key="backend_path"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -96,36 +90,27 @@ ynh_systemd_action --service_name=$app --action=stop --log_path=systemd
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|
||||||
then
|
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||||
|
|
||||||
# Frontend
|
# Frontend
|
||||||
ynh_setup_source --dest_dir="$install_dir" --source_id="front"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
executable="$(find $tempdir -name "vikunja-*" \! -name "*.sha256")"
|
||||||
|
ln -s "$executable" "$install_dir/vikunja"
|
||||||
|
|
||||||
# Backend
|
chmod +x "$install_dir/vikunja"
|
||||||
mkdir -p "$backend_path/files"
|
|
||||||
tempdir="$(mktemp -d)"
|
|
||||||
ynh_setup_source --dest_dir=$tempdir --source_id="back"
|
|
||||||
back="$(find $tempdir -name "vikunja-*" \! -name "*.sha256")"
|
|
||||||
cp "$back" "$backend_path/vikunja"
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
chmod +x "$backend_path/vikunja"
|
|
||||||
chown -R $app:www-data "$backend_path/files"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE A CONFIGURATION
|
# UPGRADE A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading a configuration file..." --weight=1
|
ynh_script_progression --message="Upgrading a configuration file..." --weight=1
|
||||||
|
|
||||||
ynh_add_config --template="config.yml" --destination="$backend_path/config.yml"
|
ynh_add_config --template="config.yml" --destination="$install_dir/config.yml"
|
||||||
|
|
||||||
chmod 400 "$backend_path/config.yml"
|
chmod 400 "$install_dir/config.yml"
|
||||||
chown $app:$app "$backend_path/config.yml"
|
chown $app:$app "$install_dir/config.yml"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json
|
||||||
|
|
||||||
test_format = 1.0
|
test_format = 1.0
|
||||||
|
|
||||||
[default]
|
[default]
|
||||||
|
|
Loading…
Add table
Reference in a new issue