1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/n8n_ynh.git synced 2024-09-03 19:55:52 +02:00

Merge pull request #3 from YunoHost-Apps/testing

Fix
This commit is contained in:
Éric Gaspar 2021-09-18 23:56:59 +02:00 committed by GitHub
commit 52105f323b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 108 additions and 161 deletions

View file

@ -1,72 +1,43 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# n8n for YunoHost
[![Integration level](https://dash.yunohost.org/integration/etherpad.svg)](https://dash.yunohost.org/appci/app/etherpad) ![](https://ci-apps.yunohost.org/ci/badges/etherpad.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/etherpad.maintain.svg)
[![Install Etherpad-Lite with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=etherpad)
[![Integration level](https://dash.yunohost.org/integration/n8n.svg)](https://dash.yunohost.org/appci/app/n8n) ![](https://ci-apps.yunohost.org/ci/badges/n8n.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/n8n.maintain.svg)
[![Install n8n with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=n8n)
*[Lire ce readme en français.](./README_fr.md)*
> *This package allow you to install Etherpad-Lite 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.*
> :warning: This package installs Etherpad-Lite (without MyPads and plugins). It uses PostgreSQL as database.
>If you want to install Etherpad with the MyPads plugin, use the [Etherpad MyPads package](https://github.com/YunoHost-Apps/etherpad_mypads_ynh).
> *This package allows you to install n8n quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview
Etherpad allows you to edit documents collaboratively in real-time, much like a live multi-player editor that runs in your browser. Write articles, press releases, to-do lists, etc. together with your friends, fellow students or colleagues, all working on the same document at the same time.
**Shipped version:** 0.138.0
n8n is an extendable workflow automation tool. With a fair-code distribution model, n8n will always have visible source code, be available to self-host, and allow you to add your own custom functions, logic and apps. n8n's node-based approach makes it highly versatile, enabling you to connect anything to everything.
## Screenshots
**Shipped version:** 0.138.0~ynh1
![]()
**Demo:** https://demo.example.com
## Demo
## Documentation and resources
* [Official demo]()
* Official app website: https://n8n.io/
* Official admin documentation: https://docs.n8n.io/
* Upstream app code repository: https://github.com/n8n-io/n8n
* YunoHost documentation for this app: https://yunohost.org/app_n8n
* Report a bug: https://github.com/YunoHost-Apps/n8n_ynh/issues
## Configuration
## Developer info
You can access Etherpad's admin panel at `domain.tld/admin`. The configuration file for Etherpad is at the path `/var/www/etherpad/settings.json`.
*Skin Builder* (accessible at this address `domain.tld/pad/p/test#skinvariantsbuilder`) allows you to customize the skin of your pad. It will give you a parameter to copy into your configuration file `/var/www/etherpad/settings.json`.
## Documentation
* Official documentation: http://etherpad.org/doc/v1.8.13
* YunoHost documentation: https://yunohost.org/en/app_etherpad
## YunoHost specific features
#### Multi-users support
* Is LDAP auth supported? **No**
* Can the app be used by multiple users? **Yes**
#### Supported architectures
* x86-64 - [![](https://ci-apps.yunohost.org/ci/logs/etherpad%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/etherpad/)
* ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/etherpad%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/etherpad/)
## Limitations
## Additionnal informations
## Links
* Report a bug: https://github.com/YunoHost-Apps/etherpad_ynh/issues
* n8n website: https://n8n.io/
* Upstream app repository: https://github.com/n8n-io/n8n
* YunoHost website: https://yunohost.org/
---
## Developers infos
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing).
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/n8n_ynh/tree/testing).
To try the testing branch, please proceed like that.
```
sudo yunohost app install https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing --debug
sudo yunohost app install https://github.com/YunoHost-Apps/n8n_ynh/tree/testing --debug
or
sudo yunohost app upgrade etherpad -u https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing --debug
sudo yunohost app upgrade n8n -u https://github.com/YunoHost-Apps/n8n_ynh/tree/testing --debug
```
**More info regarding app packaging:** https://yunohost.org/packaging_apps

View file

@ -1,72 +1,39 @@
# n8n pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/etherpad.svg)](https://dash.yunohost.org/appci/app/etherpad) ![](https://ci-apps.yunohost.org/ci/badges/etherpad.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/etherpad.maintain.svg)
[![Installer Etherpad-Lite avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=etherpad)
[![Niveau d'intégration](https://dash.yunohost.org/integration/n8n.svg)](https://dash.yunohost.org/appci/app/n8n) ![](https://ci-apps.yunohost.org/ci/badges/n8n.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/n8n.maintain.svg)
[![Installer n8n avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=n8n)
*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer Etherpad-Lite rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/install_fr) pour savoir comment l'installer et en profiter.*
> *Ce package vous permet d'installer n8n rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
> :warning: Ce paquet installe Etherpad-Lite (sans MyPads et divers plugins). Il utilise PostgreSQL comme base de données.
> Si vous souhaitez installer Etherpad avec MyPads, utilisez le paquet [Etherpad MyPads](https://github.com/YunoHost-Apps/etherpad_mypads_ynh).
## Vue d'ensemble
## Résumé
Etherpad vous permet d'éditer des documents de manière collaborative en temps réel, un peu comme un éditeur multi-joueurs en direct qui s'exécute dans votre navigateur. Rédigez des articles, des communiqués de presse, des listes de choses à faire, etc. avec vos amis, camarades ou collègues, tous travaillant sur le même document en même temps.
n8n is an extendable workflow automation tool. With a fair-code distribution model, n8n will always have visible source code, be available to self-host, and allow you to add your own custom functions, logic and apps. n8n's node-based approach makes it highly versatile, enabling you to connect anything to everything.
**Version embarquée :** 0.138.0
**Version incluse :** 0.138.0~ynh1
## Captures d'écran
**Démo :** https://demo.example.com
![]()
## Documentations et ressources
## Démo
* Site officiel de l'app : https://n8n.io/
* Documentation officielle de l'admin : https://docs.n8n.io/
* Dépôt de code officiel de l'app : https://github.com/n8n-io/n8n
* Documentation YunoHost pour cette app : https://yunohost.org/app_n8n
* Signaler un bug : https://github.com/YunoHost-Apps/n8n_ynh/issues
* [Démo officielle]()
## Informations pour les développeurs
## Configuration
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/n8n_ynh/tree/testing).
Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain.tld/admin`. Le fichier de configuration d'Etherpad est `/var/www/etherpad/settings.json`.
*Skin Builder* (accessible à l'adresse `domain.tld/pad/p/test#skinvariantsbuilder`) vous permet de personnaliser l'apparence de votre pad. Il vous donnera un paramètre à copier dans votre fichier de configuration `/var/www/etherpad/settings.json`.
## Documentation
* Documentation officielle : http://etherpad.org/doc/v1.8.13
* Documentation YunoHost : https://yunohost.org/fr/app_etherpad
## Fonctionnalités spécifiques à YunoHost
#### Support multi-utilisateurs
* L'authentification LDAP est-elle prise en charge ? **Non**
* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui**
#### Architectures supportées
* x86-64 - [![](https://ci-apps.yunohost.org/ci/logs/etherpad%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/etherpad/)
* ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/etherpad%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/etherpad/)
## Limitations
## Informations additionnelles
## Liens
* Reporter un bug : https://github.com/YunoHost-Apps/etherpad_ynh/issues
* Site d'Etherpad : http://etherpad.org/
* Dépôt GitHub de l'application : https://github.com/ether/etherpad-lite
* Site de YunoHost : https://yunohost.org/
---
## Informations à l'intention des développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing).
Pour tester la branche testing, merci de procéder ainsi.
Pour essayer la branche testing, procédez comme suit.
```
sudo yunohost app install https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing --debug
sudo yunohost app install https://github.com/YunoHost-Apps/n8n_ynh/tree/testing --debug
ou
sudo yunohost app upgrade etherpad -u https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing --debug
sudo yunohost app upgrade n8n -u https://github.com/YunoHost-Apps/n8n_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps

View file

@ -13,7 +13,7 @@
upgrade=1
#upgrade=1 from_commit=
backup_restore=1
multi_instance=1
multi_instance=0
change_url=1
;;; Options
Email=

View file

@ -18,7 +18,7 @@ N8N_BASIC_AUTH_PASSWORD=__PASSWORD__
# Optional timezone to set which gets used by Cron-Node by default
# If not set New York time will be used
GENERIC_TIMEZONE=Europe/Berlin
GENERIC_TIMEZONE=__TIMEZONE__
# The email address to use for the SSL certificate creation
SSL_EMAIL=user@example.com

View file

@ -1,6 +0,0 @@
SOURCE_URL=https://github.com/n8n-io/n8n/archive/refs/tags/n8n@0.132.2.tar.gz
SOURCE_SUM=26b419f6a8859f3bced47ed616e48fa76b3f9121c376319342206e335564c5f3
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=

View file

View file

@ -1,14 +1,13 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
location / {
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://127.0.0.1:__PORT__/;
proxy_set_header Host $host;
proxy_pass_header Server;
proxy_pass http://127.0.0.1:__PORT__/;
proxy_set_header Host $host;
proxy_pass_header Server;
proxy_buffering off;
more_set_headers "X-Frame-Options : ALLOWALL";
proxy_set_header X-Real-IP $remote_addr;

View file

@ -1,5 +1,5 @@
[Unit]
Description=n8n
Description=n8n: Workflow Automation Tool
After=syslog.target network.target
[Service]
@ -9,7 +9,7 @@ Group=__APP__
WorkingDirectory=__FINALPATH__/
Environment=PATH=__ENV_PATH__
Environment=NODE_ENV=production
ExecStart=__YNH_NPM__ __APP__ start
ExecStart=__FINALPATH__/node_modules/n8n/bin/n8n
Restart=always
[Install]

View file

@ -3,8 +3,8 @@
"id": "n8n",
"packaging_format": 1,
"description": {
"en": "",
"fr": ""
"en": "Workflow Automation Tool. Easily automate tasks across different services.",
"fr": "Outil d'automatisation du flux de travail. Automatisez facilement les tâches sur différents services."
},
"version": "0.138.0~ynh1",
"url": "https://n8n.io/",
@ -15,14 +15,14 @@
"admindoc": "https://docs.n8n.io/",
"code": "https://github.com/n8n-io/n8n"
},
"license": "",
"license": "Apache-2.0",
"maintainer": {
"name": ""
},
"requirements": {
"yunohost": ">= 4.2.4"
},
"multi_instance": true,
"multi_instance": false,
"services": [
"nginx"
],
@ -30,22 +30,24 @@
"install" : [
{
"name": "domain",
"type": "domain",
"type": "domain"
},
{
"name": "path",
"type": "path",
"example": "/n8n",
"default": "/n8n"
"name": "admin",
"type": "user"
},
{
"name": "is_public",
"type": "boolean",
"help": {
"en": "If enabled, Etherpad will be accessible by people who do not have an account. This can be changed later via the webadmin.",
"fr": "Si cette case est cochée, Etherpad sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
"en": "If enabled, n8n will be accessible by people who do not have an account. This can be changed later via the webadmin.",
"fr": "Si cette case est cochée, n8n sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
},
"default": true
},
{
"name": "password",
"type": "password"
}
]
}

View file

@ -25,6 +25,7 @@ app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP

View file

@ -17,7 +17,7 @@ old_domain=$YNH_APP_OLD_DOMAIN
old_path=$YNH_APP_OLD_PATH
new_domain=$YNH_APP_NEW_DOMAIN
new_path=$YNH_APP_NEW_PATH
new_path="/"
app=$YNH_APP_INSTANCE_NAME
@ -29,6 +29,11 @@ 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)
port=$(ynh_app_setting_get --app=$app --key=port)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
password=$(ynh_app_setting_get --app=$app --key=password)
timezone="$(cat /etc/timezone)"
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
@ -101,6 +106,18 @@ then
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
fi
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
domain=$new_domain
path=$new_path
ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
chmod 400 "$final_path/.env"
chown $app:$app "$final_path/.env"
#=================================================
# RELOAD NGINX
#=================================================
@ -114,7 +131,7 @@ ynh_systemd_action --service_name=nginx --action=reload
ynh_script_progression --message="Starting a systemd service..." --weight=6
# Start a systemd service
ynh_systemd_action --service_name=$app --action=restart --log_path=systemd
ynh_systemd_action --service_name=$app --action=restart --log_path=systemd --line_match="Editor is now accessible via:"
#=================================================
# END OF SCRIPT

View file

@ -24,8 +24,11 @@ ynh_abort_if_errors
#=================================================
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
path_url="/"
is_public=$YNH_APP_ARG_IS_PUBLIC
password=$YNH_APP_ARG_PASSWORD
admin=$YNH_APP_ARG_ADMIN
timezone="$(cat /etc/timezone)"
app=$YNH_APP_INSTANCE_NAME
@ -47,6 +50,8 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=password --value=$password
#=================================================
# STANDARD MODIFICATIONS
@ -56,7 +61,7 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_script_progression --message="Finding an available port..." --weight=1
# Find an available port
port=$(ynh_find_port --port=9001)
port=$(ynh_find_port --port=5678)
ynh_app_setting_set --app=$app --key=port --value=$port
#=================================================
@ -91,19 +96,16 @@ ynh_script_progression --message="Setting up source files..." --weight=1
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src
#ynh_setup_source --dest_dir=$final_path
mkdir -p $final_path
#=================================================
# INSTALL ETHERPAD
# INSTALL n8n
#=================================================
ynh_script_progression --message="Installing $app..." --weight=2
chown -R $app: $final_path
pushd $final_path
ynh_use_nodejs
ynh_exec_as $app env $ynh_node_load_PATH npm install n8n@$n8n_version -g
ynh_exec_warn_less env $ynh_node_load_PATH npm install n8n --unsafe-perm
popd
chmod 750 "$final_path"
@ -147,6 +149,7 @@ chown $app:$app "$final_path/.env"
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=4
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
# Create a dedicated systemd config
ynh_add_systemd_config
@ -155,7 +158,7 @@ ynh_add_systemd_config
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=3
yunohost service add $app --description="" --log="/var/log/$app/$app.log"
yunohost service add $app --description="Workflow Automation Tool" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
@ -163,7 +166,7 @@ yunohost service add $app --description="" --log="/var/log/$app/$app.log"
ynh_script_progression --message="Starting a systemd service..." --weight=6
# Start a systemd service
ynh_systemd_action --service_name=$app --action=restart --log_path=systemd #--line_match=""
ynh_systemd_action --service_name=$app --action=restart --log_path=systemd --line_match="Editor is now accessible via:"
#=================================================
# SETUP SSOWAT

View file

@ -19,6 +19,8 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
port=$(ynh_app_setting_get --app=$app --key=port)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
#=================================================
# STANDARD REMOVE
@ -41,7 +43,6 @@ ynh_script_progression --message="Stopping and removing the systemd service..."
# Remove the dedicated systemd config
ynh_remove_systemd_config
#=================================================
# REMOVE THE MYSQL DATABASE
#=================================================

View file

@ -100,7 +100,7 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=3
yunohost service add $app --description="" --log="/var/log/$app/$app.log"
yunohost service add $app --description="Workflow Automation Tool" --log="/var/log/$app/$app.log"
#=================================================
# RESTORE SYSTEMD
@ -115,7 +115,7 @@ systemctl enable $app.service --quiet
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=8
ynh_systemd_action --service_name=$app --action=restart --log_path=systemd #--line_match=""
ynh_systemd_action --service_name=$app --action=restart --log_path=systemd --line_match="Editor is now accessible via:"
#=================================================
# GENERIC FINALIZATION

View file

@ -21,6 +21,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
#=================================================
# CHECK VERSION
@ -70,7 +71,7 @@ then
# Download, check integrity, uncompress and patch the source from app.src
pushd $final_path
ynh_use_nodejs
ynh_exec_as $app env $ynh_node_load_PATH npm install n8n@$n8n_version
ynh_exec_warn_less env $ynh_node_load_PATH npm install n8n@${n8n_version}
popd
fi
@ -93,21 +94,12 @@ ynh_script_progression --message="Installing dependencies..." --weight=12
ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1
ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
chmod 400 "$final_path/.env"
chown $app:$app "$final_path/.env"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
# Create a dedicated systemd config
ynh_add_systemd_config
@ -116,14 +108,14 @@ ynh_add_systemd_config
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
yunohost service add $app --description="" --log="/var/log/$app/$app.log"
yunohost service add $app --description="Workflow Automation Tool" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=6
ynh_systemd_action --service_name=$app --action=restart --log_path=systemd #--line_match=""
ynh_systemd_action --service_name=$app --action=restart --log_path=systemd --line_match="Editor is now accessible via:"
#=================================================
# RELOAD NGINX