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

Merge pull request #4 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-11-29 22:07:04 +01:00 committed by GitHub
commit f664cf2819
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 26 additions and 25 deletions

View file

@ -28,7 +28,6 @@ Web application for managing employee absences
## Documentation and resources
* Official app website: https://timeoff.management/
* Official user documentation: https://yunohost.org/apps
* Official admin documentation: https://timeoff.management/support/main-page.html
* Upstream app code repository: https://github.com/timeoff-management/timeoff-management-application
* YunoHost documentation for this app: https://yunohost.org/app_timeoff

View file

@ -24,7 +24,6 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
## Documentations et ressources
* Site officiel de l'app : https://timeoff.management/
* Documentation officielle utilisateur : https://yunohost.org/apps
* Documentation officielle de l'admin : https://timeoff.management/support/main-page.html
* Dépôt de code officiel de l'app : https://github.com/timeoff-management/timeoff-management-application
* Documentation YunoHost pour cette app : https://yunohost.org/app_timeoff

View file

@ -1,6 +1,5 @@
SOURCE_URL=https://github.com/timeoff-management/timeoff-management-application/archive/refs/tags/1.3.3.tar.gz
SOURCE_SUM=e320350dbf1d1ce272cee1db845e3658945d57e49eb97a56df3d00cf63ab6fe6
SOURCE_URL=https://github.com/timeoff-management/timeoff-management-application/archive/refs/tags/1.4.0.tar.gz
SOURCE_SUM=2831826b689cf1f4bc7e7ae03ac42c4c846a56a8c3e1368f3a1326f46977cdcc
SOURCE_SUM_PRG=sha256sum
ARCH_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=

View file

@ -1,9 +1,5 @@
location __PATH__/ {
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://127.0.0.1:__PORT__/;
proxy_set_header Host $host;
proxy_buffering off;

View file

@ -7,10 +7,10 @@ Type=simple
User=__APP__
Group=__APP__
#Environment="PORT=__PORT__"
#Environment="PATH=__ENV_PATH__"
Environment="PATH=__ENV_PATH__"
Environment="NODE_ENV=production"
WorkingDirectory=__FINALPATH__/
ExecStart=__YNH_NODE__ bin/wwww
ExecStart=__YNH_NODE__ bin/wwww
Restart=always
[Install]

View file

@ -12,7 +12,6 @@
"website": "https://timeoff.management/",
"demo": "https://demo.example.com",
"admindoc": "https://timeoff.management/support/main-page.html",
"userdoc": "https://yunohost.org/apps",
"code": "https://github.com/timeoff-management/timeoff-management-application"
},
"license": "MIT",
@ -21,7 +20,7 @@
"email": "ju@paraiso.me"
},
"requirements": {
"yunohost": ">= 4.2.4"
"yunohost": ">= 4.3.0"
},
"multi_instance": false,
"services": [
@ -31,8 +30,7 @@
"install" : [
{
"name": "domain",
"type": "domain",
"example": "example.com"
"type": "domain"
},
{
"name": "is_public",

View file

@ -5,7 +5,7 @@
#=================================================
# nodejs version
nodejs_version=14
nodejs_version=16
# dependencies used by the app
pkg_dependencies="sqlite3"

View file

@ -32,7 +32,6 @@ app=$YNH_APP_INSTANCE_NAME
ynh_script_progression --message="Validating installation parameters..."
final_path=/var/www/$app
config_path=/home/yunohost.app/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
# Register (book) web path
@ -105,6 +104,20 @@ chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#chmod -R +x "$final_path/bin"
#=================================================
# CREATE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Creating a data directory..." --weight=1
datadir=/home/yunohost.app/$app
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
mkdir -p $datadir
chmod 750 "$datadir"
chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -136,7 +149,7 @@ ynh_script_progression --message="Installing TimeOff..."
pushd $final_path
ynh_use_nodejs
ynh_exec_warn_less NODE_ENV=production npm install -g npm
ynh_exec_warn_less $ynh_npm install
popd
#=================================================
@ -153,7 +166,7 @@ ynh_add_config --template="../conf/db.json" --destination="$final_path/config/db
ynh_script_progression --message="Configuring a systemd service..."
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
ynh_replace_string --match_string="__YNH_NODE__" --replace_string="$ynh_node" --target_file="../conf/systemd.service"
ynh_add_systemd_config
#=================================================

View file

@ -18,8 +18,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
port=$(ynh_app_setting_get --app=$app --key=port)
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#db_user=$db_name
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================

View file

@ -34,8 +34,7 @@ db_user=$db_name
#=================================================
ynh_script_progression --message="Validating restoration parameters..."
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
#=================================================
# STANDARD RESTORATION STEPS

View file

@ -113,8 +113,8 @@ then
ynh_script_progression --message="Upgrading the lounge..."
pushd $final_path
ynh_use_nodejs
ynh_exec_warn_less NODE_ENV=production npm cache clean
ynh_exec_warn_less NODE_ENV=production npm update
ynh_exec_warn_less $ynh_npm cache clean
ynh_exec_warn_less $ynh_npm update
popd
fi