1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mobilizon_ynh.git synced 2024-09-03 19:46:19 +02:00

Merge pull request #51 from YunoHost-Apps/example_ynh

Apply example_ynh
This commit is contained in:
yalh76 2020-03-12 19:14:38 +01:00 committed by GitHub
commit 957df1d8bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 18 deletions

View file

@ -1,18 +1,19 @@
location / { location / {
if ($scheme = http) { # Force usage of https
rewrite ^ https://$server_name$request_uri? permanent; if ($scheme = http) {
} rewrite ^ https://$server_name$request_uri? permanent;
}
# Standard nginx configuration # Standard nginx configuration
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_pass http://localhost:__PORT__; proxy_pass http://localhost:__PORT__;
client_max_body_size 16m; client_max_body_size 16m;
# Include SSOWAT user panel. # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;
} }

View file

@ -125,8 +125,6 @@ ynh_setup_source --dest_dir="$final_path/$app"
#================================================= #=================================================
ynh_print_info --message="Configuring nginx web server..." ynh_print_info --message="Configuring nginx web server..."
### `ynh_add_nginx_config` will use the file conf/nginx.conf
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config

View file

@ -52,6 +52,7 @@ test ! -d $final_path \
#================================================= #=================================================
# RESTORE THE NGINX CONFIGURATION # RESTORE THE NGINX CONFIGURATION
#================================================= #=================================================
ynh_print_info --message="Restoring the nginx configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"

View file

@ -34,6 +34,7 @@ admin_email=$(ynh_app_setting_get --app=$app --key=admin_email)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
ynh_print_info --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
@ -190,8 +191,8 @@ chown -R "$app":"$app" "$final_path"
pushd $final_path/$app/js pushd $final_path/$app/js
ynh_use_nodejs ynh_use_nodejs
sudo -u $app env PATH=$PATH npm install sudo -u $app env PATH=$PATH yarn install
sudo -u $app env PATH=$PATH npm run build sudo -u $app env PATH=$PATH yarn run build
popd popd
pushd $final_path/$app pushd $final_path/$app