Préparer le paquet Globinours 1.0.0-rc.3
This commit is contained in:
parent
00f9eece9a
commit
1a5401e30d
14 changed files with 53 additions and 40 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*.log
|
||||
.DS_Store
|
||||
16
LICENSE
Normal file
16
LICENSE
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Globinours YunoHost package
|
||||
|
||||
Copyright (C) 2026 OverSu
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
25
README.md
25
README.md
|
|
@ -1,19 +1,10 @@
|
|||
# Globinours pour YunoHost — paquet de test 1.0.0-rc.1
|
||||
# Globinours pour YunoHost — 1.0.0-rc.3
|
||||
|
||||
Ce paquet installe Globinours sur un domaine ou sous-domaine dédié. La version de test télécharge l’archive depuis un petit serveur HTTP local lancé sur la machine YunoHost ; aucun dépôt Git ni publication externe n’est nécessaire.
|
||||
Ce paquet installe Globinours sur un domaine ou sous-domaine dédié. Il télécharge une archive immuable de l’application depuis le dépôt Forgejo officiel, puis vérifie son empreinte SHA-256 avant installation.
|
||||
|
||||
## Test local
|
||||
## Installation de test
|
||||
|
||||
Copier sur le serveur YunoHost le dossier du paquet sous `/root/globinours_ynh` et `globinours-1.0.0-rc.1.tar.gz` sous `/root/globinours-source/`.
|
||||
|
||||
Dans une première session SSH :
|
||||
|
||||
```bash
|
||||
cd /root/globinours-source
|
||||
python3 -m http.server 8123 --bind 127.0.0.1
|
||||
```
|
||||
|
||||
Dans une seconde session SSH :
|
||||
Depuis un clone du paquet présent sur le serveur YunoHost :
|
||||
|
||||
```bash
|
||||
sudo yunohost app install /root/globinours_ynh --debug --force --no-remove-on-failure
|
||||
|
|
@ -21,4 +12,10 @@ sudo yunohost app install /root/globinours_ynh --debug --force --no-remove-on-fa
|
|||
|
||||
Choisir un domaine ou sous-domaine libre. Après l’installation, ouvrir son URL et terminer la création du premier administrateur dans l’assistant Globinours.
|
||||
|
||||
Avant publication, remplacer l’URL locale par celle de l’archive officielle, recalculer son SHA-256 et remplacer `1.0.0~rc1~ynh1` par `1.0.0~ynh1`.
|
||||
Pour tester une mise à niveau du paquet :
|
||||
|
||||
```bash
|
||||
sudo yunohost app upgrade globinours -u /root/globinours_ynh --debug
|
||||
```
|
||||
|
||||
Globinours utilise ses propres comptes applicatifs : l’intégration LDAP et l’authentification SSO YunoHost ne sont donc pas utilisées.
|
||||
|
|
|
|||
2
conf/extra_php-fpm.conf
Normal file
2
conf/extra_php-fpm.conf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
php_admin_value[max_execution_time] = 600
|
||||
php_admin_value[open_basedir] = __INSTALL_DIR__:__DATA_DIR__:/tmp:/usr/share/php
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
location __PATH__/ {
|
||||
alias __INSTALL_DIR__/public/;
|
||||
index index.php;
|
||||
client_max_body_size 260M;
|
||||
try_files $uri $uri/ __PATH__/index.php?$query_string;
|
||||
location ~ /\. { deny all; }
|
||||
location = __PATH__/index.php {
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME __INSTALL_DIR__/public/index.php;
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
fastcgi_pass unix:/var/run/php/php8.2-fpm-__APP__.sock;
|
||||
fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
[__APP__]
|
||||
user = __APP__
|
||||
group = __APP__
|
||||
listen = /var/run/php/php8.2-fpm-__APP__.sock
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
pm = ondemand
|
||||
pm.max_children = 8
|
||||
pm.process_idle_timeout = 10s
|
||||
php_admin_value[upload_max_filesize] = 250M
|
||||
php_admin_value[post_max_size] = 260M
|
||||
php_admin_value[max_execution_time] = 600
|
||||
php_admin_value[open_basedir] = __INSTALL_DIR__:__DATA_DIR__:/tmp
|
||||
|
|
@ -1,9 +1,11 @@
|
|||
#:schema https://raw.githubusercontent.com/YunoHost/apps/main/schemas/manifest.v2.schema.json
|
||||
|
||||
packaging_format = 2
|
||||
id = "globinours"
|
||||
name = "Globinours"
|
||||
description.en = "Lightweight animal shelter management"
|
||||
description.fr = "Gestion légère et complète pour refuges animaliers"
|
||||
version = "1.0.0~rc1~ynh1"
|
||||
version = "1.0.0-rc.3~ynh1"
|
||||
maintainers = ["OverSu"]
|
||||
|
||||
[upstream]
|
||||
|
|
@ -24,21 +26,21 @@ ram.runtime = "100M"
|
|||
[install]
|
||||
[install.domain]
|
||||
type = "domain"
|
||||
full_domain = true
|
||||
[install.init_main_permission]
|
||||
type = "group"
|
||||
default = "visitors"
|
||||
|
||||
[resources]
|
||||
[resources.sources.main]
|
||||
# URL locale utilisée par le bundle de test pré-1.0.
|
||||
url = "http://127.0.0.1:8123/globinours-1.0.0-rc.1.tar.gz"
|
||||
sha256 = "d467adc4646bd541cdc695991cb80de5f7a0170d422ff1ef86e9d072af17ebe0"
|
||||
in_subdir = false
|
||||
url = "https://nnsprod.com/git/oversu/Globinours/archive/9a2b4068da3c707aa32f365b2d7943398703c44b.tar.gz"
|
||||
sha256 = "164f56084cf6c75fd1a6f2ae9c7639c65b09e54266b7d3fd07bb1902515a36b5"
|
||||
in_subdir = true
|
||||
autoupdate.strategy = "latest_forgejo_commit"
|
||||
autoupdate.upstream = "https://nnsprod.com/git/oversu/Globinours"
|
||||
[resources.system_user]
|
||||
[resources.install_dir]
|
||||
[resources.data_dir]
|
||||
[resources.permissions]
|
||||
main.url = "/"
|
||||
[resources.apt]
|
||||
packages = "php8.2-fpm, php8.2-cli, php8.2-sqlite3, php8.2-mbstring, php8.2-xml, php8.2-zip, php8.2-gd, php8.2-curl, php8.2-intl, sqlite3, rsync"
|
||||
packages = "php8.2-fpm, php8.2-cli, php8.2-sqlite3, php8.2-mbstring, php8.2-xml, php8.2-zip, php8.2-gd, php8.2-curl, php8.2-intl, sqlite3"
|
||||
|
|
|
|||
8
scripts/_common.sh
Normal file → Executable file
8
scripts/_common.sh
Normal file → Executable file
|
|
@ -1,14 +1,20 @@
|
|||
#!/bin/bash
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
php_upload_max_filesize="250M"
|
||||
|
||||
prepare_persistent_paths() {
|
||||
mkdir -p "$data_dir/association" "$data_dir/grants" "$data_dir/medical-documents" \
|
||||
"$data_dir/private-media" "$data_dir/media" "$data_dir/storage/logs" \
|
||||
"$data_dir/storage/backups" "$data_dir/storage/releases"
|
||||
rm -rf "$install_dir/data" "$install_dir/storage" "$install_dir/public/media"
|
||||
ynh_safe_rm "$install_dir/data"
|
||||
ynh_safe_rm "$install_dir/storage"
|
||||
ynh_safe_rm "$install_dir/public/media"
|
||||
ln -s "$data_dir" "$install_dir/data"
|
||||
ln -s "$data_dir/storage" "$install_dir/storage"
|
||||
ln -s "$data_dir/media" "$install_dir/public/media"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
chown -R "$app:$app" "$data_dir"
|
||||
chmod -R u=rwX,g=rX,o= "$install_dir"
|
||||
chmod -R u=rwX,g=,o= "$data_dir"
|
||||
}
|
||||
|
|
|
|||
0
scripts/backup
Normal file → Executable file
0
scripts/backup
Normal file → Executable file
2
scripts/change_url
Normal file → Executable file
2
scripts/change_url
Normal file → Executable file
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
source _common.sh
|
||||
ynh_change_url_nginx_config
|
||||
ynh_config_change_url_nginx
|
||||
ynh_systemctl --service=nginx --action=reload
|
||||
|
|
|
|||
2
scripts/install
Normal file → Executable file
2
scripts/install
Normal file → Executable file
|
|
@ -6,4 +6,4 @@ prepare_persistent_paths
|
|||
ynh_config_add_phpfpm
|
||||
ynh_config_add_nginx
|
||||
ynh_exec_as_app php "$install_dir/scripts/migrate.php"
|
||||
ynh_systemctl --service=php8.2-fpm --action=reload
|
||||
ynh_systemctl --service="php$php_version-fpm" --action=reload
|
||||
|
|
|
|||
0
scripts/remove
Normal file → Executable file
0
scripts/remove
Normal file → Executable file
4
scripts/restore
Normal file → Executable file
4
scripts/restore
Normal file → Executable file
|
|
@ -4,7 +4,7 @@ ynh_restore "$install_dir"
|
|||
ynh_restore "$data_dir"
|
||||
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf"
|
||||
chown -R "$app:$app" "$install_dir" "$data_dir"
|
||||
prepare_persistent_paths
|
||||
ynh_exec_as_app php "$install_dir/scripts/migrate.php"
|
||||
ynh_systemctl --service=php8.2-fpm --action=reload
|
||||
ynh_systemctl --service="php$php_version-fpm" --action=reload
|
||||
ynh_systemctl --service=nginx --action=reload
|
||||
|
|
|
|||
2
scripts/upgrade
Normal file → Executable file
2
scripts/upgrade
Normal file → Executable file
|
|
@ -12,4 +12,4 @@ ynh_config_add_nginx
|
|||
ynh_exec_as_app php "$install_dir/scripts/migrate.php"
|
||||
rm -f "$data_dir/storage/maintenance.flag"
|
||||
trap - EXIT
|
||||
ynh_systemctl --service=php8.2-fpm --action=reload
|
||||
ynh_systemctl --service="php$php_version-fpm" --action=reload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue