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

Differents corrections

This commit is contained in:
frju365 2020-05-16 19:20:53 +02:00
parent aa81c63c86
commit 44c04c0df3
No known key found for this signature in database
GPG key ID: C892BE847FF5635A
6 changed files with 75 additions and 14 deletions

56
README
View file

@ -0,0 +1,56 @@
# Meilisearch app for YunoHost
[![Integration level](https://dash.yunohost.org/integration/meilisearch.svg)](https://dash.yunohost.org/appci/app/meilisearch)
[![Install Meilisearch with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=meilisearch)
*[Lire ce readme en français.](./README_fr.md)*
> *This package allow you to install Meilisearch quickly and simply on a YunoHost server.
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
## Overview
Meilisearch is an opensource next generation search API.
**Shipped version:** 0.10.1
## Screenshots
![Meilisearch Demo](movies-web-demo.gif)
## Configuration
At the installation, be sure to set up an API key to secure your API.
#### Multi-users support
It's an API and there is no authentification, without API key.
#### Supported architectures
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/meilisearch%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/meilisearch/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/meilisearch%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/meilisearch/)
## Links
* Report a bug: https://github.com/frju365/meilisearch_ynh/issues
* App website: https://www.meilisearch.com/
* Upstream app repository: https://github.com/meilisearch/MeiliSearch
* YunoHost website: https://yunohost.org/
---
Developers info
----------------
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
Please do your pull request to the [testing branch](https://github.com/frju365/meilisearch_ynh/tree/testing).
To try the testing branch, please proceed like that.
```
sudo yunohost app install https://github.com/frju365/meilisearch_ynh/tree/testing --debug
or
sudo yunohost app upgrade meilisearch -u https://github.com/frju365/meilisearch_ynh/tree/testing --debug
```

View file

@ -1,6 +1,10 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:__PORT__;
# Path to source

View file

@ -53,6 +53,7 @@
},
{
"name": "master_key",
"type": "string",
"ask": {
"en": "Choose a master API key for Meilisearch",
"fr": "Choisissez une clef d'API pour Meilisearch"

View file

@ -65,7 +65,7 @@ ynh_app_setting_set --app=$app --key=allow_analyse --value=$allow_analyse
# FIND AND OPEN A PORT
#=================================================
ynh_script_progression --message="Configuring firewall..." --time --weight=1
ynh_script_progression --message="Configuring firewall..." --time --weight=2
# Find an available port
port=$(ynh_find_port --port=8095)
@ -75,7 +75,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
# DOWNLOAD AND INSTALL MEILISEARCH
#=================================================
ynh_script_progression --message="Installing meilisearch..." --time --weight=1
ynh_script_progression --message="Installing meilisearch..." --time --weight=5
arch=$(ynh_detect_arch)
@ -110,7 +110,7 @@ ynh_system_user_create --username=$app
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --time --weight=1
ynh_script_progression --message="Configuring a systemd service..." --time --weight=2
if [ $allow_analyse ]; then
ynh_replace_string "__ANALYTICS__" "false" "../conf/systemd.service"
@ -157,10 +157,10 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
#=================================================
# SETUP FAIL2BAN
#=================================================
ynh_script_progression --message="Configuring fail2ban..." --time --weight=1
# Create a dedicated fail2ban config
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
#ynh_script_progression --message="Configuring fail2ban..." --time --weight=1
#
## Create a dedicated fail2ban config
#ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
#=================================================
# SETUP SSOWAT

View file

@ -53,7 +53,7 @@ ynh_secure_remove --file=$final_path
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing nginx web server configuration..." --time --weight=1
ynh_script_progression --message="Removing nginx web server configuration..." --time --weight=3
# Remove the dedicated nginx config
ynh_remove_nginx_config
@ -61,7 +61,7 @@ ynh_remove_nginx_config
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Removing logrotate configuration..." --time --weight=1
ynh_script_progression --message="Removing logrotate configuration..." --time
# Remove the app-specific logrotate config
ynh_remove_logrotate
@ -79,17 +79,17 @@ fi
#=================================================
# REMOVE FAIL2BAN CONFIGURATION
#=================================================
ynh_script_progression --message="Removing fail2ban configuration..." --time --weight=1
#ynh_script_progression --message="Removing fail2ban configuration..." --time --weight=1
# Remove the dedicated fail2ban config
ynh_remove_fail2ban_config
#ynh_remove_fail2ban_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_script_progression --message="Removing the dedicated system user..." --time --weight=1
ynh_script_progression --message="Removing the dedicated system user..." --time
# Delete a system user
ynh_system_user_delete --username=$app

View file

@ -159,10 +159,10 @@ ynh_add_systemd_config
#=================================================
# UPGRADE FAIL2BAN
#=================================================
ynh_script_progression --message="Reconfiguring fail2ban..." --time --weight=1
#ynh_script_progression --message="Reconfiguring fail2ban..." --time --weight=1
# Create a dedicated fail2ban config
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
#ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
#=================================================
# SECURE FILES AND DIRECTORIES