mirror of
https://github.com/YunoHost-Apps/libreerp_ynh.git
synced 2024-09-03 19:36:13 +02:00
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"
|
domain="domain.tld"
|
||||||
version="14"
|
version="14"
|
||||||
oca=0
|
oca=0
|
||||||
admin_password="testpassw0rD"
|
|
||||||
lang="en_US"
|
lang="en_US"
|
||||||
tz="Etc/GMT"
|
tz="Etc/GMT"
|
||||||
|
admin="john"
|
||||||
|
admin_password="testpassw0rD"
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=0
|
setup_sub_dir=0
|
||||||
|
|
|
@ -1,51 +1,51 @@
|
||||||
location / {
|
location / {
|
||||||
if ($scheme = http) {
|
try_files $uri @__APP__;
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
|
||||||
}
|
|
||||||
try_files $uri @__APP__;
|
|
||||||
}
|
}
|
||||||
location @__APP__ {
|
|
||||||
proxy_pass http://127.0.0.1:__PORT__;
|
|
||||||
|
|
||||||
client_max_body_size 50M;
|
|
||||||
client_body_timeout 60m;
|
|
||||||
fastcgi_read_timeout 60m;
|
|
||||||
|
|
||||||
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
location @__APP__ {
|
||||||
proxy_buffers 16 64k;
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
proxy_buffer_size 128k;
|
|
||||||
proxy_redirect off;
|
client_max_body_size 50M;
|
||||||
proxy_set_header Host $host;
|
client_body_timeout 60m;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
fastcgi_read_timeout 60m;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_buffers 16 64k;
|
||||||
proxy_read_timeout 720s;
|
proxy_buffer_size 128k;
|
||||||
proxy_connect_timeout 720s;
|
proxy_redirect off;
|
||||||
proxy_send_timeout 720s;
|
proxy_set_header Host $host;
|
||||||
|
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;
|
||||||
|
proxy_read_timeout 720s;
|
||||||
|
proxy_connect_timeout 720s;
|
||||||
|
proxy_send_timeout 720s;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /longpolling {
|
location /longpolling {
|
||||||
proxy_pass http://127.0.0.1:__PORT_CHAT__;
|
proxy_pass http://127.0.0.1:__PORT_CHAT__;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
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-Proto $scheme;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
proxy_read_timeout 720s;
|
proxy_read_timeout 720s;
|
||||||
proxy_connect_timeout 720s;
|
proxy_connect_timeout 720s;
|
||||||
proxy_send_timeout 720s;
|
proxy_send_timeout 720s;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* /web/static/ {
|
location ~* /web/static/ {
|
||||||
proxy_cache_valid 200 90m;
|
proxy_cache_valid 200 90m;
|
||||||
proxy_buffering on;
|
proxy_buffering on;
|
||||||
expires 864000;
|
expires 864000;
|
||||||
proxy_pass http://127.0.0.1:__PORT__;
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
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-Proto $scheme;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
proxy_read_timeout 720s;
|
proxy_read_timeout 720s;
|
||||||
proxy_connect_timeout 720s;
|
proxy_connect_timeout 720s;
|
||||||
proxy_send_timeout 720s;
|
proxy_send_timeout 720s;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,10 +37,6 @@
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain"
|
"type": "domain"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "admin",
|
|
||||||
"type": "user"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "version",
|
"name": "version",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -60,14 +56,6 @@
|
||||||
"fr": "Désirez vous installer OCA à la place des sources de LibreERP (pas encore implémenté)"
|
"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",
|
"name": "lang",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -86,6 +74,18 @@
|
||||||
"fr": "Choisissez un fuseau horaire"
|
"fr": "Choisissez un fuseau horaire"
|
||||||
},
|
},
|
||||||
"default": "Etc/UTC"
|
"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
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url="/"
|
path_url="/"
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
|
||||||
export app_version=$YNH_APP_ARG_VERSION
|
export app_version=$YNH_APP_ARG_VERSION
|
||||||
oca=$YNH_APP_ARG_OCA
|
oca=$YNH_APP_ARG_OCA
|
||||||
admin_password=$YNH_APP_ARG_ADMIN_PASSWORD
|
|
||||||
lang=$YNH_APP_ARG_LANG
|
lang=$YNH_APP_ARG_LANG
|
||||||
tz=$YNH_APP_ARG_TZ
|
tz=$YNH_APP_ARG_TZ
|
||||||
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
|
admin_password=$YNH_APP_ARG_ADMIN_PASSWORD
|
||||||
|
|
||||||
export app=$YNH_APP_INSTANCE_NAME
|
export app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
|
|
@ -57,13 +57,6 @@ test ! -d $final_path \
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD RESTORATION STEPS
|
# 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
|
# RECREATE THE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -95,6 +88,13 @@ ynh_script_progression --message="Reinstalling dependencies..."
|
||||||
# Define and install dependencies
|
# Define and install dependencies
|
||||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_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
|
# ADD SWAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -100,6 +100,14 @@ ynh_script_progression --message="Upgrading dependencies..."
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_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
|
# SPECIFIC UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue