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

Ask whether meilisearch should run in dev or prod mode

This commit is contained in:
Florent 2021-10-08 15:45:18 +02:00 committed by Florent F
parent ed90f82965
commit 065bc4e298
6 changed files with 15 additions and 2 deletions

View file

@ -44,4 +44,4 @@ Notification=none
manifest_arg=domain=DOMAIN&path=PATH&is_public=1&data_path=""&master_key="YUNOHOST-API-KEY-202020201456452135"&
; commit=adb788162e27a843d52582cb03106861e1b17c9c
name=From Version 0.15.0ynh~1 (Fixes #14)
manifest_arg=domain=DOMAIN&path=PATH&is_public=1&data_path=""&master_key="YUNOHOST-API-KEY-202020201456452135"&
manifest_arg=domain=DOMAIN&path=PATH&is_public=1&data_path=""&master_key="YUNOHOST-API-KEY-202020201456452135"&environment=development

View file

@ -7,7 +7,7 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__/
ExecStart=/usr/bin/meilisearch --http-addr 127.0.0.1:__PORT__ --env production --master-key __MASTER_KEY__ --no-analytics __ANALYTICS__
ExecStart=/usr/bin/meilisearch --http-addr 127.0.0.1:__PORT__ --env __ENVIRONMENT__ --master-key __MASTER_KEY__ --no-analytics __ANALYTICS__
[Install]
WantedBy=multi-user.target

View file

@ -41,6 +41,16 @@
},
"example": "API-key245678635248795"
},
{
"name": "environment",
"type": "string",
"choices": ["development", "production"],
"default": "development",
"ask": {
"en": "Choose whether your instance run in production mode or in development mode (which brings an UI)",
"fr": "Choisissez si votre instance tourne en mode production ou développement (lequel offre une interface graphique)"
}
},
{
"name": "allow_analyse",
"type": "boolean",

View file

@ -29,6 +29,7 @@ path_url="/"
is_public=$YNH_APP_ARG_IS_PUBLIC
master_key=$YNH_APP_ARG_MASTER_KEY
allow_analyse=$YNH_APP_ARG_ALLOW_ANALYSE
environment=$YNH_APP_ARG_ENVIRONMENT
app=$YNH_APP_INSTANCE_NAME

View file

@ -31,6 +31,7 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
environment=$(ynh_app_setting_get --app=$app --key=environment)
#=================================================
# CHECK IF THE APP CAN BE RESTORED

View file

@ -22,6 +22,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
master_key=$(ynh_app_setting_get --app=$app --key=master_key)
allow_analyse=$(ynh_app_setting_get --app=$app --key=allow_analyse)
environment=$(ynh_app_setting_get --app=$app --key=environment)
# Variables used for dumps
DUMPS_DIR="$(mktemp -d -t meilisearch_dumps.XXXXX)"