1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/vikunja_ynh.git synced 2024-09-03 18:06:26 +02:00
This commit is contained in:
Éric Gaspar 2024-07-29 22:43:11 +02:00
parent 6e2b072db6
commit 3f5780c806
8 changed files with 11 additions and 18 deletions

View file

@ -21,7 +21,7 @@ service:
# The base path on the file system where the binary and assets are. # The base path on the file system where the binary and assets are.
# Vikunja will also look in this path for a config file, so you could provide only this variable to point to a folder # Vikunja will also look in this path for a config file, so you could provide only this variable to point to a folder
# with a config file which will then be used. # with a config file which will then be used.
rootpath: "/opt/vikunja/" rootpath: "__INSTALL_DIR__"
# Path on the file system to serve static files from. Set to the path of the frontend files to host frontend alongside the api. # Path on the file system to serve static files from. Set to the path of the frontend files to host frontend alongside the api.
staticpath: "" staticpath: ""
# The max number of items which can be returned per page # The max number of items which can be returned per page

View file

@ -7,8 +7,8 @@ Requires=postgresql.service redis.service
Type=simple Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=/var/www/__APP__/ WorkingDirectory=__INSTALL_DIR__/
ExecStart=/var/www/__APP__/vikunja ExecStart=__INSTALL_DIR__/vikunja
RestartSec=2s RestartSec=2s
Restart=always Restart=always

View file

@ -66,8 +66,6 @@ ram.runtime = "50M"
autoupdate.asset.arm64 = "tarball" autoupdate.asset.arm64 = "tarball"
autoupdate.asset.armhf = "tarball" autoupdate.asset.armhf = "tarball"
[resources.ports]
[resources.system_user] [resources.system_user]
allow_email = true allow_email = true
@ -80,6 +78,8 @@ ram.runtime = "50M"
api.allowed = "visitors" api.allowed = "visitors"
api.auth_header = false api.auth_header = false
[resources.ports]
[resources.apt] [resources.apt]
packages = "postgresql" packages = "postgresql"

View file

@ -18,19 +18,14 @@ ynh_print_info --message="Declaring files to be backed up..."
# BACKUP THE APP MAIN DIR # BACKUP THE APP MAIN DIR
#================================================= #=================================================
# Frontend
ynh_backup --src_path="$install_dir" ynh_backup --src_path="$install_dir"
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # SYSTEM CONFIGURATION
#================================================= #=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP SYSTEMD
#=================================================
ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_backup --src_path="/etc/systemd/system/$app.service"
#================================================= #=================================================

View file

@ -40,7 +40,7 @@ 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="$install_dir/config.yml" ynh_add_config --template="config.yml" --destination="$install_dir/config.yml"
chmod 600 "$install_dir/config.yml" chmod 600 "$install_dir/config.yml"

View file

@ -52,7 +52,6 @@ executable="$(find $install_dir -name "vikunja-*" \! -name "*.sha256")"
mv "$executable" "$install_dir/vikunja" mv "$executable" "$install_dir/vikunja"
chmod +x "$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"

View file

@ -14,7 +14,6 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_script_progression --message="Restoring $app main directory..." --weight=4 ynh_script_progression --message="Restoring $app main directory..." --weight=4
# Frontend
ynh_restore_file --origin_path="$install_dir" ynh_restore_file --origin_path="$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"

View file

@ -102,9 +102,9 @@ chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# UPGRADE A CONFIGURATION # UPDATE A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Upgrading a configuration file..." --weight=1 ynh_script_progression --message="Updating $app's configuration files..." --weight=1
ynh_add_config --template="config.yml" --destination="$install_dir/config.yml" ynh_add_config --template="config.yml" --destination="$install_dir/config.yml"
@ -112,9 +112,9 @@ chmod 400 "$install_dir/config.yml"
chown $app:$app "$install_dir/config.yml" chown $app:$app "$install_dir/config.yml"
#================================================= #=================================================
# NGINX CONFIGURATION # REAPPLY SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
ynh_add_nginx_config ynh_add_nginx_config