mirror of
https://github.com/YunoHost-Apps/vikunja_ynh.git
synced 2024-09-03 18:06:26 +02:00
commit
bea1169eaa
9 changed files with 44 additions and 120 deletions
|
@ -27,7 +27,7 @@ Vikunja is a self-hosted open-source to-do list application for all platforms.
|
|||
- CalDAV
|
||||
- Links
|
||||
|
||||
**Shipped version:** 0.21.0~ynh4
|
||||
**Shipped version:** 0.21.0~ynh5
|
||||
|
||||
**Demo:** https://try.vikunja.io/login
|
||||
|
||||
|
@ -40,6 +40,7 @@ Vikunja is a self-hosted open-source to-do list application for all platforms.
|
|||
* Official app website: <https://vikunja.io/>
|
||||
* Official admin documentation: <https://vikunja.io/docs/>
|
||||
* Upstream app code repository: <https://kolaente.dev/vikunja/>
|
||||
* YunoHost Store: <https://apps.yunohost.org/app/vikunja>
|
||||
* Report a bug: <https://github.com/YunoHost-Apps/vikunja_ynh/issues>
|
||||
|
||||
## Developer info
|
||||
|
|
|
@ -27,7 +27,7 @@ Vikunja est une application de liste de tâches Open Source auto-hébergée pour
|
|||
- CalDAV
|
||||
- Links
|
||||
|
||||
**Version incluse :** 0.21.0~ynh4
|
||||
**Version incluse :** 0.21.0~ynh5
|
||||
|
||||
**Démo :** https://try.vikunja.io/login
|
||||
|
||||
|
@ -40,6 +40,7 @@ Vikunja est une application de liste de tâches Open Source auto-hébergée pour
|
|||
* Site officiel de l’app : <https://vikunja.io/>
|
||||
* Documentation officielle de l’admin : <https://vikunja.io/docs/>
|
||||
* Dépôt de code officiel de l’app : <https://kolaente.dev/vikunja/>
|
||||
* YunoHost Store: <https://apps.yunohost.org/app/vikunja>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/vikunja_ynh/issues>
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
|
|
@ -59,9 +59,6 @@ service:
|
|||
# The maximum size clients will be able to request for user avatars.
|
||||
# If clients request a size bigger than this, it will be changed on the fly.
|
||||
maxavatarsize: __MAXAVATARSIZE__
|
||||
# If set to true, the frontend will show a big red warning not to use this instance for real data as it will be cleared out.
|
||||
# You probably don't need to set this value, it was created specifically for usage on [try](https://try.vikunja.io).
|
||||
demomode: false
|
||||
|
||||
database:
|
||||
# Database type to use. Supported types are mysql, postgres and sqlite.
|
||||
|
@ -94,18 +91,6 @@ database:
|
|||
# Enable SSL/TLS for mysql connections. Options: false, true, skip-verify, preferred
|
||||
tls: false
|
||||
|
||||
typesense:
|
||||
# Whether to enable the Typesense integration. If true, all tasks will be synced to the configured Typesense
|
||||
# instance and all search and filtering will run through Typesense instead of only through the database.
|
||||
# Typesense allows fast fulltext search including fuzzy matching support. It may return different results than
|
||||
# what you'd get with a database-only search.
|
||||
enabled: false
|
||||
# The url to the Typesense instance you want to use. Can be hosted locally or in Typesense Cloud as long
|
||||
# as Vikunja is able to reach it.
|
||||
url: ''
|
||||
# The Typesense API key you want to use.
|
||||
apikey: ''
|
||||
|
||||
redis:
|
||||
# Whether to enable redis or not
|
||||
enabled: true
|
||||
|
@ -136,11 +121,11 @@ mailer:
|
|||
# **NOTE:** If you're unable to send mail and the only error you see in the logs is an `EOF`, try setting the port to `25`.
|
||||
port: 25
|
||||
# SMTP Auth Type. Can be either `plain`, `login` or `cram-md5`.
|
||||
authtype: "plain"
|
||||
authtype: "login"
|
||||
# SMTP username
|
||||
username: ""
|
||||
username: "__APP__"
|
||||
# SMTP password
|
||||
password: ""
|
||||
password: "__MAIL_PWD__"
|
||||
# Wether to skip verification of the tls certificate on the server
|
||||
skiptlsverify: true
|
||||
# The default from address when sending emails
|
||||
|
@ -154,13 +139,13 @@ mailer:
|
|||
|
||||
log:
|
||||
# A folder where all the logfiles should go.
|
||||
path: /var/log
|
||||
path: "/var/log/__APP__"
|
||||
# Whether to show any logging at all or none
|
||||
enabled: true
|
||||
# Where the normal log should go. Possible values are stdout, stderr, file or off to disable standard logging.
|
||||
standard: "stdout"
|
||||
# Change the log level. Possible values (case-insensitive) are CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG.
|
||||
level: "INFO"
|
||||
level: "DEBUG"
|
||||
# Whether or not to log database queries. Useful for debugging. Possible values are stdout, stderr, file or off to disable database logging.
|
||||
database: "off"
|
||||
# The log level for database log messages. Possible values (case-insensitive) are CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG.
|
||||
|
@ -172,11 +157,11 @@ log:
|
|||
# Whether or not to log events. Useful for debugging. Possible values are stdout, stderr, file or off to disable events logging.
|
||||
events: "off"
|
||||
# The log level for event log messages. Possible values (case-insensitive) are ERROR, INFO, DEBUG.
|
||||
eventslevel: "info"
|
||||
eventslevel: "DEBUG"
|
||||
# Whether or not to log mail log messages. This will not log mail contents. Possible values are stdout, stderr, file or off to disable mail-related logging.
|
||||
mail: "off"
|
||||
# The log level for mail log messages. Possible values (case-insensitive) are ERROR, WARNING, INFO, DEBUG.
|
||||
maillevel: "info"
|
||||
maillevel: "DEBUG"
|
||||
|
||||
ratelimit:
|
||||
# whether or not to enable the rate limit
|
||||
|
@ -345,4 +330,4 @@ defaultsettings:
|
|||
# The language of the user interface. Must be an ISO 639-1 language code. Will default to the browser language the user uses when signing up.
|
||||
language: __LANGUAGE__
|
||||
# The time zone of each individual user. This will affect when users get reminders and overdue task emails.
|
||||
timezone: <time zone set at service.timezone>
|
||||
#timezone: <time zone set at service.timezone>
|
||||
|
|
|
@ -5,7 +5,7 @@ name = "Vikunja"
|
|||
description.en = "Self-hosted To-Do list application"
|
||||
description.fr = "Application de liste de tâches auto-hébergée"
|
||||
|
||||
version = "0.21.0~ynh4"
|
||||
version = "0.21.0~ynh5"
|
||||
|
||||
maintainers = ["eric_G"]
|
||||
|
||||
|
@ -40,8 +40,8 @@ ram.runtime = "50M"
|
|||
ask.en = "Choose the application language"
|
||||
ask.fr = "Choisissez la langue de l'application"
|
||||
type = "select"
|
||||
choices = ["de", "en", "es", "fa", "fr", "it", "lt", "nl", "pl", "pt"]
|
||||
default = "en"
|
||||
choices = ["en", "fr-FR"]
|
||||
default = "fr-FR"
|
||||
|
||||
[resources]
|
||||
|
||||
|
@ -65,6 +65,7 @@ ram.runtime = "50M"
|
|||
[resources.ports]
|
||||
|
||||
[resources.system_user]
|
||||
allow_email = true
|
||||
|
||||
[resources.install_dir]
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ redis_db=$(ynh_redis_get_free_db)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action=stop --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
|
|
|
@ -15,6 +15,8 @@ source /usr/share/yunohost/helpers
|
|||
|
||||
timezone="$(cat /etc/timezone)"
|
||||
secret=$(ynh_string_random --length=32)
|
||||
redis_db=$(ynh_redis_get_free_db)
|
||||
backend_path=/opt/$app
|
||||
|
||||
set_motd=""
|
||||
enable_registration="true"
|
||||
|
@ -26,16 +28,11 @@ enable_userdeletion="true"
|
|||
maxavatarsize=1024
|
||||
maxitemsperpage=50
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
|
||||
backend_path=/opt/$app
|
||||
|
||||
#=================================================
|
||||
# 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=enable_registration --value=$enable_registration
|
||||
ynh_app_setting_set --app=$app --key=enable_linksharing --value=$enable_linksharing
|
||||
|
@ -54,7 +51,6 @@ ynh_script_progression --message="Setting up frontend..." --weight=1
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir" --source_id="front"
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
|
@ -63,8 +59,6 @@ chown -R $app:www-data "$install_dir"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setting up backend..." --weight=1
|
||||
|
||||
ynh_app_setting_set --app=$app --key=backend_path --value=$backend_path
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
mkdir -p "$backend_path"
|
||||
mkdir -p "$backend_path/files"
|
||||
|
@ -77,38 +71,26 @@ chmod +x "$backend_path/vikunja"
|
|||
chown -R $app:www-data "$backend_path/files"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=3
|
||||
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
ynh_add_systemd_config
|
||||
|
||||
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
|
||||
|
||||
redis_db=$(ynh_redis_get_free_db)
|
||||
ynh_add_config --template="../conf/config.yml" --destination="$backend_path/config.yml"
|
||||
ynh_add_config --template="config.yml" --destination="$backend_path/config.yml"
|
||||
|
||||
chmod 400 "$backend_path/config.yml"
|
||||
chown $app:$app "$backend_path/config.yml"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
||||
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="Self-hosted To-Do list application" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
|
|
@ -10,10 +10,11 @@ source _common.sh
|
|||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
# REMOVE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
||||
# REMOVE SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||
|
@ -22,34 +23,14 @@ then
|
|||
yunohost service remove $app
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STOP AND REMOVE SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
|
||||
|
||||
# Remove the dedicated systemd config
|
||||
ynh_remove_systemd_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE THE REDIS DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing the redis database..."
|
||||
|
||||
ynh_redis_remove_db "$redis_db"
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing $app main directory..." --weight=6
|
||||
|
||||
# Remove backend
|
||||
ynh_secure_remove --file="$backend_path"
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=5
|
||||
|
||||
# Remove the dedicated NGINX config
|
||||
ynh_remove_nginx_config
|
||||
|
||||
|
|
|
@ -9,15 +9,6 @@
|
|||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
@ -39,36 +30,30 @@ chown -R $app:www-data "$backend_path/files"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
|
||||
|
||||
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
|
||||
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
# RESTORE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the systemd configuration..." --weight=5
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service --quiet
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
|
||||
yunohost service add $app --description="Self-hosted To-Do list application" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="server started on"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="server started on"
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ source /usr/share/yunohost/helpers
|
|||
|
||||
timezone="$(cat /etc/timezone)"
|
||||
secret=$(ynh_string_random --length=32)
|
||||
redis_db=$(ynh_redis_get_free_db)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -79,7 +80,7 @@ if [ -z "${maxitemsperpage:-}" ]; then
|
|||
fi
|
||||
|
||||
if [ -z "${language:-}" ]; then
|
||||
language=en
|
||||
language="en"
|
||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
fi
|
||||
|
||||
|
@ -100,7 +101,6 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
# Frontend
|
||||
ynh_setup_source --dest_dir="$install_dir" --source_id="front"
|
||||
|
||||
|
@ -122,8 +122,7 @@ chown -R $app:www-data "$backend_path/files"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading a configuration file..." --weight=1
|
||||
|
||||
redis_db=$(ynh_redis_get_free_db)
|
||||
ynh_add_config --template="../conf/config.yml" --destination="$backend_path/config.yml"
|
||||
ynh_add_config --template="config.yml" --destination="$backend_path/config.yml"
|
||||
|
||||
chmod 400 "$backend_path/config.yml"
|
||||
chown $app:$app "$backend_path/config.yml"
|
||||
|
@ -133,21 +132,10 @@ chown $app:$app "$backend_path/config.yml"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring a systemd service..." --weight=2
|
||||
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
|
||||
yunohost service add $app --description="Self-hosted To-Do list application" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue