diff --git a/check_process b/check_process index 001e1ee..736fe8f 100644 --- a/check_process +++ b/check_process @@ -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 diff --git a/conf/systemd.service b/conf/systemd.service index 8af88a7..0cec2fe 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -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 diff --git a/manifest.json b/manifest.json index 0382b67..4888f04 100644 --- a/manifest.json +++ b/manifest.json @@ -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", diff --git a/scripts/install b/scripts/install index e4ff01e..535cb93 100644 --- a/scripts/install +++ b/scripts/install @@ -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 diff --git a/scripts/restore b/scripts/restore index 35f9bf6..0fdf787 100644 --- a/scripts/restore +++ b/scripts/restore @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index 855c011..41ce8ae 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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)"