Apply last example_ynh
This commit is contained in:
parent
54f2820459
commit
2772f4fd23
6 changed files with 74 additions and 65 deletions
|
@ -4,9 +4,10 @@
|
|||
domain="domain.tld"
|
||||
version="14"
|
||||
oca=0
|
||||
admin_password="testpassw0rD"
|
||||
lang="en_US"
|
||||
tz="Etc/GMT"
|
||||
admin="john"
|
||||
admin_password="testpassw0rD"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=0
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
location / {
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
try_files $uri @__APP__;
|
||||
}
|
||||
|
||||
location @__APP__ {
|
||||
proxy_pass http://127.0.0.1:__PORT__;
|
||||
|
||||
|
@ -24,6 +22,7 @@ location @__APP__ {
|
|||
proxy_connect_timeout 720s;
|
||||
proxy_send_timeout 720s;
|
||||
}
|
||||
|
||||
location /longpolling {
|
||||
proxy_pass http://127.0.0.1:__PORT_CHAT__;
|
||||
proxy_set_header Host $host;
|
||||
|
@ -35,6 +34,7 @@ location /longpolling {
|
|||
proxy_connect_timeout 720s;
|
||||
proxy_send_timeout 720s;
|
||||
}
|
||||
|
||||
location ~* /web/static/ {
|
||||
proxy_cache_valid 200 90m;
|
||||
proxy_buffering on;
|
||||
|
|
|
@ -37,10 +37,6 @@
|
|||
"name": "domain",
|
||||
"type": "domain"
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user"
|
||||
},
|
||||
{
|
||||
"name": "version",
|
||||
"type": "string",
|
||||
|
@ -60,14 +56,6 @@
|
|||
"fr": "Désirez vous installer OCA à la place des sources de LibreERP (pas encore implémenté)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "admin_password",
|
||||
"type": "password",
|
||||
"ask": {
|
||||
"en": "Choose a strong master admin password",
|
||||
"fr": "Choisissez un mot de passe maître fort pour l'administration"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "lang",
|
||||
"type": "string",
|
||||
|
@ -86,6 +74,18 @@
|
|||
"fr": "Choisissez un fuseau horaire"
|
||||
},
|
||||
"default": "Etc/UTC"
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user"
|
||||
},
|
||||
{
|
||||
"name": "admin_password",
|
||||
"type": "password",
|
||||
"ask": {
|
||||
"en": "Choose a strong master admin password",
|
||||
"fr": "Choisissez un mot de passe maître fort pour l'administration"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -25,12 +25,12 @@ ynh_abort_if_errors
|
|||
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url="/"
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
export app_version=$YNH_APP_ARG_VERSION
|
||||
oca=$YNH_APP_ARG_OCA
|
||||
admin_password=$YNH_APP_ARG_ADMIN_PASSWORD
|
||||
lang=$YNH_APP_ARG_LANG
|
||||
tz=$YNH_APP_ARG_TZ
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
admin_password=$YNH_APP_ARG_ADMIN_PASSWORD
|
||||
|
||||
export app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
|
|
@ -57,13 +57,6 @@ test ! -d $final_path \
|
|||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the NGINX web server configuration..."
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -95,6 +88,13 @@ ynh_script_progression --message="Reinstalling dependencies..."
|
|||
# Define and install dependencies
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the NGINX web server configuration..."
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# ADD SWAP
|
||||
#=================================================
|
||||
|
|
|
@ -100,6 +100,14 @@ ynh_script_progression --message="Upgrading dependencies..."
|
|||
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue