mirror of
https://github.com/YunoHost-Apps/endi_ynh.git
synced 2024-09-03 18:35:54 +02:00
Testing (#2)
* Cleanup post v2 --------- Co-authored-by: Félix Piédallu <felix.piedallu@non.se.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
parent
db41ffff76
commit
6c76df9e48
9 changed files with 43 additions and 47 deletions
|
@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
|||
|
||||
enDI est un progiciel de gestion d'entreprise. C'est l'outil de pilotage de l'activité économique et sociale entièrement dédié aux CAE ainsi qu'à toute entreprise et collectif d'entrepreneur.euse.s indépendant.e.s.
|
||||
|
||||
### Caractéristiques :
|
||||
### Fonctionnalités
|
||||
|
||||
- Gestion sociale des entrepreneurs
|
||||
- Gestion sociale et statistique de l'accompagnement pour le reporting aux financeurs
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
enDI est un progiciel de gestion d'entreprise. C'est l'outil de pilotage de l'activité économique et sociale entièrement dédié aux CAE ainsi qu'à toute entreprise et collectif d'entrepreneur.euse.s indépendant.e.s.
|
||||
|
||||
### Caractéristiques :
|
||||
### Fonctionnalités
|
||||
|
||||
- Gestion sociale des entrepreneurs
|
||||
- Gestion sociale et statistique de l'accompagnement pour le reporting aux financeurs
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
|
||||
|
||||
packaging_format = 2
|
||||
|
||||
id = "endi"
|
||||
|
@ -30,7 +32,6 @@ ram.runtime = "50M"
|
|||
[install]
|
||||
[install.domain]
|
||||
type = "domain"
|
||||
full_domain = true
|
||||
|
||||
[install.init_main_permission]
|
||||
type = "group"
|
||||
|
@ -43,9 +44,9 @@ ram.runtime = "50M"
|
|||
type = "password"
|
||||
|
||||
[resources]
|
||||
[resources.sources.main]
|
||||
url = "https://framagit.org/endi/endi/-/archive/8d2d1e9cbc495dd48712d380c9f039a4e5b877dc/endi-8d2d1e9cbc495dd48712d380c9f039a4e5b877dc.tar.gz"
|
||||
sha256 = "16fdee654c59c1ce1f914ca5a620fb9cebd3d2bd5e03e9d4442e68a5daf559ae"
|
||||
[resources.sources.main]
|
||||
url = "https://framagit.org/endi/endi/-/archive/8d2d1e9cbc495dd48712d380c9f039a4e5b877dc/endi-8d2d1e9cbc495dd48712d380c9f039a4e5b877dc.tar.gz"
|
||||
sha256 = "16fdee654c59c1ce1f914ca5a620fb9cebd3d2bd5e03e9d4442e68a5daf559ae"
|
||||
|
||||
[resources.ports]
|
||||
|
||||
|
@ -58,7 +59,26 @@ ram.runtime = "50M"
|
|||
admin.url = "/admin"
|
||||
|
||||
[resources.apt]
|
||||
packages = "mariadb_server python3-pip python3-venv cython3 npm python3-mysqldb libmariadb-dev-compat mariadb-client libjpeg-dev libfreetype6 libfreetype6-dev libssl-dev libxml2-dev zlib1g-dev libxslt1-dev libcairo2 libpango-1.0-0 libpangocairo-1.0-0"
|
||||
packages = [
|
||||
"mariadb_server",
|
||||
"python3-pip",
|
||||
"python3-venv",
|
||||
"cython3",
|
||||
"npm",
|
||||
"python3-mysqldb",
|
||||
"libmariadb-dev-compat",
|
||||
"mariadb-client",
|
||||
"libjpeg-dev",
|
||||
"libfreetype6",
|
||||
"libfreetype6-dev",
|
||||
"libssl-dev",
|
||||
"libxml2-dev",
|
||||
"zlib1g-dev",
|
||||
"libxslt1-dev",
|
||||
"libcairo2",
|
||||
"libpango-1.0-0",
|
||||
"libpangocairo-1.0-0",
|
||||
]
|
||||
|
||||
[resources.database]
|
||||
type = "mysql"
|
||||
|
|
|
@ -4,28 +4,6 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
# dependencies used by the app (must be on a single line)
|
||||
#REMOVEME? pkg_dependencies=(
|
||||
python3-pip
|
||||
python3-venv
|
||||
cython3
|
||||
|
||||
npm
|
||||
|
||||
python3-mysqldb
|
||||
# libmariadbclient-dev
|
||||
libmariadb-dev-compat
|
||||
mariadb-client
|
||||
|
||||
libjpeg-dev libfreetype6 libfreetype6-dev
|
||||
libssl-dev
|
||||
libxml2-dev
|
||||
zlib1g-dev
|
||||
|
||||
libxslt1-dev
|
||||
libcairo2 libpango-1.0-0 libpangocairo-1.0-0
|
||||
)
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -29,13 +29,13 @@ ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setting up source files..." --weight=1
|
||||
|
||||
ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir
|
||||
ynh_app_setting_set --app="$app" --key=install_dir --value="$install_dir"
|
||||
ynh_setup_source --dest_dir="$install_dir/endi"
|
||||
|
||||
__ynh_endi_patch_src
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
@ -57,14 +57,14 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1
|
|||
ynh_add_config --template="endi.ini" --destination="$install_dir/endi.ini"
|
||||
|
||||
chmod 500 "$install_dir/endi.ini"
|
||||
chown $app:$app "$install_dir/endi.ini"
|
||||
chown "$app:$app" "$install_dir/endi.ini"
|
||||
|
||||
#=================================================
|
||||
# CREATE LOG DIRECTORY
|
||||
#=================================================
|
||||
|
||||
mkdir "/var/log/$app"
|
||||
chown -R $app:$app "/var/log/$app"
|
||||
chown -R "$app:$app" "/var/log/$app"
|
||||
chmod 750 "/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
|
@ -98,14 +98,14 @@ ynh_use_logrotate
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="enDI, logiciel de comptabilité pour CAE" --log="/var/log/$app/logfile.log"
|
||||
yunohost service add "$app" --description="enDI, logiciel de comptabilité pour CAE" --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="/var/log/$app/logfile.log"
|
||||
ynh_systemd_action --service_name="$app" --action="start"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -16,10 +16,10 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
|
||||
# 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
|
||||
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
||||
yunohost service remove $app
|
||||
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
||||
yunohost service remove "$app"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -27,7 +27,6 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
|
||||
|
||||
# Remove the dedicated systemd config
|
||||
ynh_remove_systemd_config
|
||||
|
||||
#=================================================
|
||||
|
@ -35,7 +34,6 @@ ynh_remove_systemd_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Removing logrotate configuration..." --weight=1
|
||||
|
||||
# Remove the app-specific logrotate config
|
||||
ynh_remove_logrotate
|
||||
|
||||
#=================================================
|
||||
|
@ -50,7 +48,6 @@ ynh_redis_remove_db "$redis_db"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
|
||||
|
||||
# Remove the dedicated NGINX config
|
||||
ynh_remove_nginx_config
|
||||
|
||||
#=================================================
|
||||
|
@ -60,7 +57,6 @@ ynh_remove_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Removing log files..." --weight=1
|
||||
|
||||
# Remove the log files
|
||||
ynh_secure_remove --file="/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -54,14 +54,14 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="enDI, logiciel de comptabilité pour CAE" --log="/var/log/$app/logfile.log"
|
||||
yunohost service add $app --description="enDI, logiciel de comptabilité pour CAE" --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="/var/log/$app/logfile.log"
|
||||
ynh_systemd_action --service_name=$app --action="start"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json
|
||||
|
||||
test_format = 1.0
|
||||
|
||||
[default]
|
||||
|
|
Loading…
Add table
Reference in a new issue