mirror of
https://github.com/YunoHost-Apps/codimd_ynh.git
synced 2024-09-03 18:16:32 +02:00
install in sub folder
This commit is contained in:
parent
d54b6c4189
commit
3ec4c07d78
7 changed files with 19 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
;; Test complet
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/" (PATH)
|
||||
path="/path" (PATH)
|
||||
admin="john" (USER)
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
; Checks
|
||||
|
@ -15,7 +15,7 @@
|
|||
backup_restore=1
|
||||
multi_instance=1
|
||||
port_already_use=1
|
||||
change_url=0
|
||||
change_url=1
|
||||
;;; Levels
|
||||
Level 5=auto
|
||||
;;; Options
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"protocolUseSSL": true,
|
||||
"domain": "__DOMAIN__",
|
||||
"port": "__PORT__",
|
||||
"urlPath": "__PATH__",
|
||||
"sessionSecret": "__SESSION__",
|
||||
"loglevel": "info",
|
||||
"useCDN": false,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
location ^~ / {
|
||||
location ^~ __PATH__/ {
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
|
|
|
@ -28,7 +28,17 @@
|
|||
"en": "Choose a domain name for CodiMD",
|
||||
"fr": "Choisissez un nom de domaine pour CodiMD"
|
||||
},
|
||||
"example": "codimd.domain.org"
|
||||
"example": "domain.org"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"type": "path",
|
||||
"ask": {
|
||||
"en": "Choose a path for CodiMD",
|
||||
"fr": "Choisissez un chemin pour CodiMD"
|
||||
},
|
||||
"example": "/codimd",
|
||||
"default": "/codimd"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
|
|
|
@ -28,6 +28,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
|||
|
||||
# Needed for helper "ynh_add_nginx_config"
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -24,7 +24,7 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url="/"
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
session=$(ynh_string_random --length=30)
|
||||
|
||||
|
@ -148,6 +148,7 @@ ynh_script_progression --message="Modifying a config file..."
|
|||
# Main config File
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="../conf/config.json.example"
|
||||
|
|
|
@ -143,6 +143,7 @@ ynh_backup_if_checksum_is_different --file="$final_path/config.json"
|
|||
# Main config File
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="../conf/config.json.example"
|
||||
|
|
Loading…
Add table
Reference in a new issue