mirror of
https://github.com/YunoHost-Apps/etherpad_ynh.git
synced 2024-09-03 18:36:10 +02:00
Merge branch 'testing' into postgresql
This commit is contained in:
commit
b4e52a8cee
17 changed files with 216 additions and 40 deletions
|
@ -22,20 +22,20 @@ Be aware, Redis database backup and restore is not fully implemented.
|
|||
If you want to install Etherpad with plugins and mysql database: https://github.com/YunoHost-Apps/etherpad_mypads_ynh",
|
||||
|
||||
|
||||
**Shipped version:** 1.9.3~ynh1
|
||||
**Shipped version:** 1.9.6~ynh1
|
||||
|
||||
**Demo:** https://video.etherpad.com/
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||

|
||||
|
||||
## Documentation and resources
|
||||
|
||||
* Official app website: <https://etherpad.org/>
|
||||
* Official admin documentation: <http://etherpad.org/doc/v1.9.3>
|
||||
* Upstream app code repository: <https://github.com/ether/etherpad-lite>
|
||||
* YunoHost documentation for this app: <https://yunohost.org/app_etherpad>
|
||||
* YunoHost Store: <https://apps.yunohost.org/app/etherpad>
|
||||
* Report a bug: <https://github.com/YunoHost-Apps/etherpad_ynh/issues>
|
||||
|
||||
## Developer info
|
||||
|
|
|
@ -22,20 +22,20 @@ Attention, la sauvegarde et la restauration de la base de données Redis ne sont
|
|||
Si vous souhaitez installer Etherpad avec les plugins et la base de données mysql : https://github.com/YunoHost-Apps/etherpad_mypads_ynh",
|
||||
|
||||
|
||||
**Version incluse :** 1.9.3~ynh1
|
||||
**Version incluse :** 1.9.6~ynh1
|
||||
|
||||
**Démo :** https://video.etherpad.com/
|
||||
|
||||
## Captures d’écran
|
||||
|
||||

|
||||

|
||||
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l’app : <https://etherpad.org/>
|
||||
* Documentation officielle de l’admin : <http://etherpad.org/doc/v1.9.3>
|
||||
* Dépôt de code officiel de l’app : <https://github.com/ether/etherpad-lite>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_etherpad>
|
||||
* YunoHost Store: <https://apps.yunohost.org/app/etherpad>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/etherpad_ynh/issues>
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
|
||||
"users": {
|
||||
"__ADMIN__": {
|
||||
// 1) "password" can be replaced with "hash" if you install ep_hash_auth
|
||||
// 2) please note that if password is null, the user will not be created
|
||||
"password": "__PASSWORD__",
|
||||
"is_admin": true
|
||||
}
|
||||
|
|
|
@ -1,21 +1,24 @@
|
|||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
|
||||
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; # http://wiki.nginx.org/HttpProxyModule
|
||||
proxy_set_header X-Forwarded-For $remote_addr; # EP logs to show the actual remote IP
|
||||
proxy_set_header X-Forwarded-Proto $scheme; # for EP to set secure cookie flag when https is used
|
||||
proxy_set_header Host $host; # pass the host header
|
||||
proxy_http_version 1.1; # recommended with keepalive connections
|
||||
proxy_buffering off;
|
||||
more_set_headers "X-Frame-Options : ALLOWALL";
|
||||
proxy_set_header X-Real-IP $remote_addr; # http://wiki.nginx.org/HttpProxyModule
|
||||
proxy_set_header X-Forwarded-For $remote_addr; # EP logs to show the actual remote IP
|
||||
proxy_set_header X-Forwarded-Proto $scheme; # for EP to set secure cookie flag when https is used
|
||||
proxy_set_header Host $host; # pass the host header
|
||||
proxy_http_version 1.1; # recommended with keepalive connections
|
||||
|
||||
# WebSocket proxying - from http://nginx.org/en/docs/http/websocket.html
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
# WebSocket proxying - from http://nginx.org/en/docs/http/websocket.html
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
||||
location ~* __PATH__/p/[^/]*(_|%|\*)[^/]*/export/etherpad {
|
||||
|
|
|
@ -204,8 +204,8 @@
|
|||
"showChat": true,
|
||||
"showLineNumbers": true,
|
||||
"useMonospaceFont": false,
|
||||
"userName": false,
|
||||
"userColor": false,
|
||||
"userName": null,
|
||||
"userColor": null,
|
||||
"rtl": false,
|
||||
"alwaysShowChat": false,
|
||||
"chatAndUsers": false,
|
||||
|
@ -333,6 +333,22 @@
|
|||
* Settings controlling the session cookie issued by Etherpad.
|
||||
*/
|
||||
"cookie": {
|
||||
/*
|
||||
* How often (in milliseconds) the key used to sign the express_sid cookie
|
||||
* should be rotated. Long rotation intervals reduce signature verification
|
||||
* overhead (because there are fewer historical keys to check) and database
|
||||
* load (fewer historical keys to store, and less frequent queries to
|
||||
* get/update the keys). Short rotation intervals are slightly more secure.
|
||||
*
|
||||
* Multiple Etherpad processes sharing the same database (table) is
|
||||
* supported as long as the clock sync error is significantly less than this
|
||||
* value.
|
||||
*
|
||||
* Key rotation can be disabled (not recommended) by setting this to 0 or
|
||||
* null, or by disabling session expiration (see sessionLifetime).
|
||||
*/
|
||||
"keyRotationInterval": 86400000, // = 1d * 24h/d * 60m/h * 60s/m * 1000ms/s
|
||||
|
||||
/*
|
||||
* Value of the SameSite cookie property. "Lax" is recommended unless
|
||||
* Etherpad will be embedded in an iframe from another site, in which case
|
||||
|
@ -344,7 +360,51 @@
|
|||
* significant usability drawbacks vs. "Lax". See
|
||||
* https://stackoverflow.com/q/41841880 for discussion.
|
||||
*/
|
||||
"sameSite": "Lax"
|
||||
"sameSite": "Lax",
|
||||
|
||||
/*
|
||||
* How long (in milliseconds) after navigating away from Etherpad before the
|
||||
* user is required to log in again. (The express_sid cookie is set to
|
||||
* expire at time now + sessionLifetime when first created, and its
|
||||
* expiration time is periodically refreshed to a new now + sessionLifetime
|
||||
* value.) If requireAuthentication is false then this value does not really
|
||||
* matter.
|
||||
*
|
||||
* The "best" value depends on your users' usage patterns and the amount of
|
||||
* convenience you desire. A long lifetime is more convenient (users won't
|
||||
* have to log back in as often) but has some drawbacks:
|
||||
* - It increases the amount of state kept in the database.
|
||||
* - It might weaken security somewhat: The cookie expiration is refreshed
|
||||
* indefinitely without consulting authentication or authorization
|
||||
* hooks, so once a user has accessed a pad, the user can continue to
|
||||
* use the pad until the user leaves for longer than sessionLifetime.
|
||||
* - More historical keys (sessionLifetime / keyRotationInterval) must be
|
||||
* checked when verifying signatures.
|
||||
*
|
||||
* Session lifetime can be set to infinity (not recommended) by setting this
|
||||
* to null or 0. Note that if the session does not expire, most browsers
|
||||
* will delete the cookie when the browser exits, but a session record is
|
||||
* kept in the database forever.
|
||||
*/
|
||||
"sessionLifetime": 864000000, // = 10d * 24h/d * 60m/h * 60s/m * 1000ms/s
|
||||
|
||||
/*
|
||||
* How long (in milliseconds) before the expiration time of an active user's
|
||||
* session is refreshed (to now + sessionLifetime). This setting affects the
|
||||
* following:
|
||||
* - How often a new session expiration time will be written to the
|
||||
* database.
|
||||
* - How often each user's browser will ping the Etherpad server to
|
||||
* refresh the expiration time of the session cookie.
|
||||
*
|
||||
* High values reduce the load on the database and the load from browsers,
|
||||
* but can shorten the effective session lifetime if Etherpad is restarted
|
||||
* or the user navigates away.
|
||||
*
|
||||
* Automatic session refreshes can be disabled (not recommended) by setting
|
||||
* this to null.
|
||||
*/
|
||||
"sessionRefreshInterval": 86400000 // = 1d * 24h/d * 60m/h * 60s/m * 1000ms/s
|
||||
},
|
||||
|
||||
/*
|
||||
|
@ -519,7 +579,6 @@
|
|||
"points": 10
|
||||
},
|
||||
|
||||
|
||||
/*
|
||||
* Toolbar buttons configuration.
|
||||
*
|
||||
|
@ -563,5 +622,10 @@
|
|||
"customLocaleStrings": {},
|
||||
|
||||
/* Disable Admin UI tests */
|
||||
"enableAdminUITests": false
|
||||
"enableAdminUITests": false,
|
||||
|
||||
/*
|
||||
* Enable/Disable case-insensitive pad names.
|
||||
*/
|
||||
"lowerCasePadIds": false
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
[Unit]
|
||||
Description=Etherpad-lite: Collaborative editor
|
||||
After=syslog.target network.target postgresql.service
|
||||
Description=Etherpad-lite: collaborative editor
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__INSTALL_DIR__
|
||||
WorkingDirectory=__INSTALL_DIR__/
|
||||
Environment=ETHERPAD_PRODUCTION=true
|
||||
Environment="NODE_ENV=production"
|
||||
Environment="__YNH_NODE_LOAD_PATH__"
|
||||
ExecStart=__INSTALL_DIR__/src/bin/run.sh
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
You can access Etherpad's admin panel at `__DOMAIN____PATH__/admin`. The configuration file for Etherpad is at the path `__INSTALL_DIR__/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 `__INSTALL_DIR__/settings.json`.
|
||||
*Skin Builder* (accessible at this address `__DOMAIN____PATH__/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 `__INSTALL_DIR__/settings.json`.
|
||||
|
|
1
doc/PRE_INSTALL.md
Normal file
1
doc/PRE_INSTALL.md
Normal file
|
@ -0,0 +1 @@
|
|||
Please note, this package is only intended to test Etherpad with redis database. It should not be used for production.
|
1
doc/PRE_INSTALL_fr.md
Normal file
1
doc/PRE_INSTALL_fr.md
Normal file
|
@ -0,0 +1 @@
|
|||
Attention, ce package est uniquement destiné à tester Etherpad avec la base de données Redis. Il ne doit pas être utilisé en production.
|
Binary file not shown.
Before Width: | Height: | Size: 874 KiB |
BIN
doc/screenshots/screenshot.png
Normal file
BIN
doc/screenshots/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 125 KiB |
|
@ -5,7 +5,7 @@ name = "Etherpad"
|
|||
description.en = "Online editor providing collaborative editing in real-time"
|
||||
description.fr = "Éditeur en ligne fournissant l'édition collaborative en temps réel"
|
||||
|
||||
version = "1.9.3~ynh1"
|
||||
version = "1.9.6~ynh1"
|
||||
|
||||
maintainers = ["eric_G"]
|
||||
|
||||
|
@ -20,9 +20,12 @@ code = "https://github.com/ether/etherpad-lite"
|
|||
yunohost = ">= 11.2"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
|
||||
ldap = true
|
||||
|
||||
sso = true
|
||||
disk = "50M"
|
||||
|
||||
disk = "200M"
|
||||
ram.build = "2G"
|
||||
ram.runtime = "50M"
|
||||
|
||||
|
@ -50,7 +53,7 @@ ram.runtime = "50M"
|
|||
ask.fr = "Choisissez la langue de l'application"
|
||||
type = "select"
|
||||
choices = ["ca", "de", "en", "es", "fr", "gl", "hu", "it", "nl", "pt"]
|
||||
default = "en"
|
||||
default = "fr"
|
||||
|
||||
[install.admin]
|
||||
type = "user"
|
||||
|
@ -60,8 +63,8 @@ ram.runtime = "50M"
|
|||
|
||||
[resources]
|
||||
[resources.sources.main]
|
||||
url = "https://github.com/ether/etherpad-lite/archive/1.9.3.tar.gz"
|
||||
sha256 = "cbc2f7c42b4a1fead1f23c2b3e0a62b80c5b3d2a5c361948b8b223397c692023"
|
||||
url = "https://github.com/ether/etherpad-lite/archive/refs/tags/v1.9.6.tar.gz"
|
||||
sha256 = "cd0cb2c9c2c4a8f93972b3f5913ff00cd3733c732195df293c8f56f3ce0a018f"
|
||||
autoupdate.strategy = "latest_github_tag"
|
||||
|
||||
[resources.ports]
|
||||
|
@ -75,6 +78,7 @@ ram.runtime = "50M"
|
|||
admin.url = "/admin"
|
||||
admin.allowed = ["admins"]
|
||||
admin.auth_header = false
|
||||
admin.show_tile = false
|
||||
|
||||
[resources.apt]
|
||||
packages = "postgresql"
|
||||
|
|
|
@ -32,7 +32,6 @@ 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="Your Etherpad version is"
|
||||
sleep 120
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -81,6 +81,41 @@ ynh_use_logrotate
|
|||
|
||||
yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring $app..." --weight=6
|
||||
|
||||
abiword_path="null"
|
||||
soffice_path="null"
|
||||
|
||||
if [[ "$export" == "abiword" ]]
|
||||
then
|
||||
abiword_path="\"$(which abiword)\""
|
||||
elif [[ "$export" == "libreoffice" ]]
|
||||
then
|
||||
soffice_path="\"$(which soffice)\""
|
||||
fi
|
||||
|
||||
ynh_add_config --template="settings.json" --destination="$install_dir/settings.json"
|
||||
ynh_add_config --template="credentials.json" --destination="$install_dir/credentials.json"
|
||||
|
||||
chmod 600 "$install_dir/settings.json"
|
||||
chown $app:$app "$install_dir/settings.json"
|
||||
|
||||
chmod 600 "$install_dir/credentials.json"
|
||||
chown $app:$app "$install_dir/credentials.json"
|
||||
|
||||
#=================================================
|
||||
# INSTALL ETHERPAD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing $app..." --weight=10
|
||||
|
||||
pushd $install_dir
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true src/bin/installDeps.sh
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
|
|
@ -19,7 +19,12 @@ ynh_restore_file --origin_path="$install_dir"
|
|||
# Restore permissions on app files
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chmod 400 $install_dir/credentials.json
|
||||
|
||||
chmod 600 "$install_dir/settings.json"
|
||||
chown $app:$app "$install_dir/settings.json"
|
||||
|
||||
chmod 600 "$install_dir/credentials.json"
|
||||
chown $app:$app "$install_dir/credentials.json"
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
|
@ -56,7 +61,6 @@ yunohost service add $app --description="Collaborative editor" --log="/var/log/$
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=8
|
||||
|
||||
ynh_systemd_action --service_name=$app --action=restart --log_path=systemd --line_match="Your Etherpad version is"
|
||||
sleep 60
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -24,6 +24,32 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=42
|
|||
|
||||
ynh_systemd_action --service_name=$app --action=stop --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=2
|
||||
|
||||
if [ -z "${language:-}" ]; then
|
||||
# If upgrading from a version which doesn't support translations, set language to English by default
|
||||
language=en
|
||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
fi
|
||||
|
||||
if [ -z "${export:-}" ]; then
|
||||
export=none
|
||||
ynh_app_setting_set --app=$app --key=export --value=$export
|
||||
fi
|
||||
|
||||
if [ -z "${path:-}" ]; then
|
||||
path="/"
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path
|
||||
fi
|
||||
|
||||
if [ -z "${password:-}" ]; then
|
||||
password=$(ynh_string_random --length=32)
|
||||
ynh_app_setting_set --app=$app --key=password --value="$password"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
@ -31,7 +57,7 @@ ynh_systemd_action --service_name=$app --action=stop --log_path="systemd"
|
|||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep="settings.json credentials.json"
|
||||
fi
|
||||
|
||||
|
@ -56,14 +82,39 @@ ynh_use_logrotate --non-append
|
|||
|
||||
yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE ETHERPAD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configure $app..." --weight=3
|
||||
|
||||
abiword_path="null"
|
||||
soffice_path="null"
|
||||
|
||||
if [[ "$export" == "abiword" ]]
|
||||
then
|
||||
abiword_path="\"$(which abiword)\""
|
||||
elif [[ "$export" == "libreoffice" ]]
|
||||
then
|
||||
soffice_path="\"$(which soffice)\""
|
||||
fi
|
||||
|
||||
ynh_add_config --template="settings.json" --destination="$install_dir/settings.json"
|
||||
ynh_add_config --template="credentials.json" --destination="$install_dir/credentials.json"
|
||||
|
||||
chmod 600 "$install_dir/settings.json"
|
||||
chown $app:$app "$install_dir/settings.json"
|
||||
|
||||
chmod 600 "$install_dir/credentials.json"
|
||||
chown $app:$app "$install_dir/credentials.json"
|
||||
|
||||
#=================================================
|
||||
# INSTALL ETHERPAD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing $app..." --weight=90
|
||||
ynh_script_progression --message="Installing $app..." --weight=60
|
||||
|
||||
pushd $install_dir
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true src/bin/installDeps.sh
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
13
tests.toml
13
tests.toml
|
@ -6,4 +6,15 @@ test_format = 1.0
|
|||
# Commits to test upgrade from
|
||||
# -------------------------------
|
||||
|
||||
#test_upgrade_from.96653aee9379d579a655777ac274355f4afca61c.name = "Upgrade from 5.4"
|
||||
args.export = "none"
|
||||
args.password = "##SuperAdminPassword##"
|
||||
|
||||
#test_upgrade_from.96653aee9379d579a655777ac274355f4afca61c.name = "Upgrade from 5.4"
|
||||
|
||||
[with_abiword]
|
||||
args.export = "abiword"
|
||||
only = ["install.root"]
|
||||
|
||||
[with_libreoffice]
|
||||
args.export = "libreoffice"
|
||||
only = ["install.root"]
|
Loading…
Add table
Reference in a new issue