1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/planka_ynh.git synced 2024-09-03 20:06:00 +02:00

Merge pull request #1 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2023-12-14 12:52:37 +01:00 committed by GitHub
commit abddcf094f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 103 additions and 98 deletions

View file

@ -16,7 +16,18 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## Overview ## Overview
This is a dummy description of this app features Elegant open source project tracking.
### Features
- Create projects, boards, lists, cards, labels and tasks
- Add card members, track time, set a due date, add attachments, write comments
- Markdown support in a card description and comment
- Filter by members and labels
- Customize project background
- Real-time updates
- User notifications
- Internationalization
**Shipped version:** 1.15.2~ynh1 **Shipped version:** 1.15.2~ynh1

View file

@ -16,7 +16,18 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
## Vue densemble ## Vue densemble
Ceci est une fausse description des fonctionalités de l'app Suivi de projet open source élégant.
### Caractéristiques
- Créer des projets, des tableaux, des listes, des cartes, des étiquettes et des tâches
- Ajoutez des membres de la carte, suivez le temps, définissez une date d'échéance, ajoutez des pièces jointes, rédigez des commentaires
- Prise en charge du Markdown dans une description et un commentaire de carte
- Filtrer par membres et labels
- Personnaliser l'arrière-plan du projet
- Mises à jour en temps réel
- Notifications utilisateur
- InternationalisationCeci est une fausse description des fonctionalités de l'app
**Version incluse :** 1.15.2~ynh1 **Version incluse :** 1.15.2~ynh1

View file

@ -30,7 +30,4 @@ DEFAULT_ADMIN_USERNAME=__ADMIN__
# OIDC_ROLES_ATTRIBUTE=groups # OIDC_ROLES_ATTRIBUTE=groups
# OIDC_IGNORE_ROLES=true # OIDC_IGNORE_ROLES=true
## Do not edit this TZ=__TIMEZONE__
TZ=UTC
#TZ=__TIMEZONE__

View file

@ -8,7 +8,7 @@ location __PATH__/ {
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
} }
location /socket.io/ { location /.io/ {
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:__PORT_SOCKET__/; proxy_pass http://127.0.0.1:__PORT_SOCKET__/;

View file

@ -1,15 +1,15 @@
[Unit] [Unit]
Description=Planka Description=Planka: Realtime kanban board
After=network.target After=network.target
[Service] [Service]
Type=simple Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__INSTALL_DIR__/ WorkingDirectory=__INSTALL_DIR__
Environment="__YNH_NODE_LOAD_PATH__" Environment="__YNH_NODE_LOAD_PATH__"
Environment="NODE_ENV=production" Environment="NODE_ENV=production"
ExecStart=__YNH_NPM__ start --prod ExecStart=__YNH_NODE__ __INSTALL_DIR__/app.js --port=__PORT__
# Sandboxing options to harden security # Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these # Depending on specificities of your service/app, you may need to tweak these

View file

@ -1 +1,12 @@
This is a dummy description of this app features Elegant open source project tracking.
### Features
- Create projects, boards, lists, cards, labels and tasks
- Add card members, track time, set a due date, add attachments, write comments
- Markdown support in a card description and comment
- Filter by members and labels
- Customize project background
- Real-time updates
- User notifications
- Internationalization

View file

@ -1 +1,12 @@
Ceci est une fausse description des fonctionalités de l'app Suivi de projet open source élégant.
### Caractéristiques
- Créer des projets, des tableaux, des listes, des cartes, des étiquettes et des tâches
- Ajoutez des membres de la carte, suivez le temps, définissez une date d'échéance, ajoutez des pièces jointes, rédigez des commentaires
- Prise en charge du Markdown dans une description et un commentaire de carte
- Filtrer par membres et labels
- Personnaliser l'arrière-plan du projet
- Mises à jour en temps réel
- Notifications utilisateur
- InternationalisationCeci est une fausse description des fonctionalités de l'app

View file

@ -28,7 +28,7 @@ ldap = false
sso = false sso = false
disk = "50M" disk = "50M"
ram.build = "50M" ram.build = "500M"
ram.runtime = "50M" ram.runtime = "50M"
[install] [install]

View file

@ -6,7 +6,6 @@
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@ -27,6 +26,21 @@ ynh_backup --src_path="$install_dir"
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 FAIL2BAN CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP LOGROTATE
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# BACKUP SYSTEMD # BACKUP SYSTEMD
#================================================= #=================================================

View file

@ -15,12 +15,20 @@ timezone="$(cat /etc/timezone)"
firstname=$(yunohost user list --fields firstname --output-as json | jq -r .users.$admin.firstname) firstname=$(yunohost user list --fields firstname --output-as json | jq -r .users.$admin.firstname)
lastname=$(yunohost user list --fields lastname --output-as json | jq -r .users.$admin.lastname) lastname=$(yunohost user list --fields lastname --output-as json | jq -r .users.$admin.lastname)
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=password --value="$password"
ynh_app_setting_set --app=$app --key=firstname --value=$firstname
ynh_app_setting_set --app=$app --key=lastname --value=$lastname
#================================================= #=================================================
# INSTALL DEPENDENCIES # INSTALL DEPENDENCIES
#================================================= #=================================================
ynh_script_progression --message="Installing dependencies..." --weight=10 ynh_script_progression --message="Installing dependencies..." --weight=10
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#================================================= #=================================================
@ -30,9 +38,9 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#================================================= #=================================================
ynh_script_progression --message="Setting up source files..." --weight=1 ynh_script_progression --message="Setting up source files..." --weight=1
# Download, check integrity, uncompress and patch the source from manifest.toml
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
#================================================= #=================================================
@ -40,14 +48,16 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config using the conf/nginx.conf template
ynh_add_nginx_config ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log" yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log"
ynh_use_logrotate
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: <ADDR>\)$"
#================================================= #=================================================
# APP INITIAL CONFIGURATION # APP INITIAL CONFIGURATION
#================================================= #=================================================
@ -78,7 +88,6 @@ popd
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
#================================================= #=================================================

View file

@ -16,9 +16,6 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# This should be a symetric version of what happens in the install script
# 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 if ynh_exec_warn_less yunohost service status $app >/dev/null
then then
ynh_script_progression --message="Removing $app service integration..." --weight=1 ynh_script_progression --message="Removing $app service integration..." --weight=1
@ -31,6 +28,10 @@ ynh_remove_nginx_config
ynh_remove_nodejs ynh_remove_nodejs
ynh_remove_logrotate
ynh_remove_fail2ban_config
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -17,6 +17,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir" ynh_restore_file --origin_path="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
#================================================= #=================================================
@ -24,7 +25,6 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=6 ynh_script_progression --message="Reinstalling dependencies..." --weight=6
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#================================================= #=================================================
@ -48,6 +48,12 @@ systemctl enable $app.service --quiet
yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log" yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
ynh_systemd_action --action=restart --service_name=fail2ban
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
@ -55,7 +61,6 @@ yunohost service add $app --description="Realtime kanban board for workgroups" -
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
# Typically you only have either $app or php-fpm but not both at the same time...
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -9,6 +9,10 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
secret=$(ynh_string_random --length=50)
email=$(ynh_user_get_info --username=$admin --key=mail)
timezone="$(cat /etc/timezone)"
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
@ -28,10 +32,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from manifest.toml
ynh_setup_source --dest_dir="$install_dir" --keep=".env" ynh_setup_source --dest_dir="$install_dir" --keep=".env"
fi fi
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
#================================================= #=================================================
@ -47,6 +51,10 @@ ynh_add_systemd_config
yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log" yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log"
ynh_use_logrotate --non-append
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: <ADDR>\)$"
#================================================= #=================================================
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
#================================================= #=================================================

View file

@ -3,76 +3,3 @@
test_format = 1.0 test_format = 1.0
[default] [default]
# ------------
# Tests to run
# ------------
# -------------------------------------------------------------------------------
# EVERYTHING PAST THIS POINT IS OPTIONAL AND MOST LIKELY UNNECESSARY FOR NEW APPS
#--------------------------------------------------------------------------------
## Conventions in this sample:
## <- An actual comment
# <- uncommenting this should be a valid entry in 'tests.toml'
## NB: the tests to run are automatically deduced by the CI script according to the
## content of the app's manifest. The declarations below allow to customize which
## tests are ran, possibly add special test suite to test special args, or
## declare which commits to test upgrade from.
##
## You can also decide (though this is discouraged!) to ban/ignore some tests,
## The test IDs to be used in only/exclude statements are:
## * install.root
## * install.subdir
## * install.nourl
## * install.multi
## * backup_restore
## * upgrade
## * upgrade.someCommitId
## * change_url
## NB: you should NOT need this except if you really have a good reason...
# exclude = ["install.private", "install.multi"]
## For special usecases, sometimes you need to setup other things on the machine
## prior to installing the app (such as installing another app)
## (Remove this key entirely if not needed)
# preinstall = """
# sudo yunohost app install foobar
# sudo yunohost user list
# """
# -------------------------------
# Default args to use for install
# -------------------------------
## By default, the CI will automagically fill the 'standard' args
## such as domain, path, admin, is_public and password with relevant values
## and also install args with a "default" provided in the manifest..
## It should only make sense to declare custom args here for args with no default values
## NB: you should NOT need those lines unless for custom questions with no obvious/default value
# args.language = "fr_FR"
# args.multisite = 0
# -------------------------------
# Commits to test upgrade from
# -------------------------------
## 00a1a6e7 is part of commit SHA, preferrably from 'master' branch
## that points to valid install of previous version
# test_upgrade_from.00a1a6e7.name = "Upgrade from 5.4"
# test_upgrade_from.00a1a6e7.args.foo = "bar"
## This is an additional test suite
# [some_additional_testsuite]
## On additional tests suites, you can decide to run only specific tests
# only = ["install.subdir"]
# args.language = "en_GB"
# args.multisite = 1