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

Merge branch 'testing' into v2_PostgreSQL

This commit is contained in:
Éric Gaspar 2023-10-29 18:31:44 +01:00
commit 7b7657cc27
12 changed files with 62 additions and 38 deletions

View file

@ -29,7 +29,7 @@ In addition to Nextcloud core features, the following are made available with th
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal
**Shipped version:** 27.1.2~ynh1
**Shipped version:** 27.1.3~ynh1
**Demo:** https://demo.nextcloud.com/
@ -43,6 +43,7 @@ In addition to Nextcloud core features, the following are made available with th
* Official user documentation: <https://docs.nextcloud.com/server/latest/user_manual/en/>
* Official admin documentation: <https://docs.nextcloud.com/server/stable/admin_manual/>
* Upstream app code repository: <https://github.com/nextcloud/server>
* YunoHost Store: <https://apps.yunohost.org/app/nextcloud>
* Report a bug: <https://github.com/YunoHost-Apps/nextcloud_ynh/issues>
## Developer info

View file

@ -29,7 +29,7 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv
* Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, Baïkal
**Version incluse :** 27.1.2~ynh1
**Version incluse :** 27.1.3~ynh1
**Démo :** https://demo.nextcloud.com/
@ -43,6 +43,7 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv
* Documentation officielle utilisateur : <https://docs.nextcloud.com/server/latest/user_manual/en/>
* Documentation officielle de ladmin : <https://docs.nextcloud.com/server/stable/admin_manual/>
* Dépôt de code officiel de lapp : <https://github.com/nextcloud/server>
* YunoHost Store: <https://apps.yunohost.org/app/nextcloud>
* Signaler un bug : <https://github.com/YunoHost-Apps/nextcloud_ynh/issues>
## Informations pour les développeurs

View file

@ -14,11 +14,6 @@
"hashing_default_password": true,
"localstorage.allowsymlinks": true,
"simpleSignUpLink.shown": false,
"hashing_default_password": true,
"localstorage.allowsymlinks": true,
"simpleSignUpLink.shown": false,
"trashbin_retention_obligation": "auto, 30",
"versions_retention_obligation": "auto, 30",
"mail_smtpmode": "smtp",
"mail_smtpport": "25",
"mail_smtpauth": 1,

View file

@ -23,7 +23,7 @@ location ^~ __PATH__/ {
# Path to source
alias __INSTALL_DIR__/;
# Set max upload size
# set max upload size and increase upload timeout:
client_max_body_size 10G;
client_body_timeout 300s;
fastcgi_buffers 64 4K;
@ -45,7 +45,7 @@ location ^~ __PATH__/ {
# for tunning hints
client_body_buffer_size 512k;
# Add headers to serve security related headers
# HTTP response headers borrowed from Nextcloud `.htaccess`
more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;";
more_set_headers "Referrer-Policy: no-referrer";
more_set_headers "X-Content-Type-Options: nosniff";
@ -93,8 +93,6 @@ location ^~ __PATH__/ {
# `/nextcloud/index.php` to the URI, resulting in a HTTP 500 error response.
location ~ \.php(?:$|/) {
# Required for legacy support
# https://github.com/nextcloud/documentation/pull/2197#issuecomment-721432337
# This line fix the ldap admin page
rewrite ^__PATH__/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) __PATH__/index.php$request_uri;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
@ -111,6 +109,7 @@ location ^~ __PATH__/ {
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_param HTTP_ACCEPT_ENCODING ""; # Disable encoding of Nextcloud response to inject ynh scripts
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
@ -145,6 +144,11 @@ location ^~ __PATH__/ {
access_log off; # Optional: Don't log access to assets
}
# Rule borrowed from `.htaccess`
location __PATH__/remote {
return 301 __PATH__/remote.php$request_uri;
}
location ~ / {
if ($request_method ~ ^(PUT|DELETE|PATCH)$) {
rewrite ^ __PATH__/index.php$request_uri last;

View file

@ -1,17 +1,18 @@
### Comment utiliser la commande CLI
### How to use CLI commande
`sudo -u __APP__ php__YNH_PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ...`
or use `sudo yunohost app shell __APP__` then run `php occ ...`
### Configure ONLYOFFICE integration
#### With Nextcloud App (no ARM support, lower performance)
Starting from Nextcloud 18, it features a direct integration of ONLYOFFICE (an online rich text document editor) through a Nextcloud app.
Nextcloud features a direct integration of ONLYOFFICE (an online rich text document editor) through a Nextcloud app.
To install and configure it:
- Install *Community Document Server* application in your Nextcloud. That's the part that runs ONLYOFFICE server.
- Install *ONLYOFFICE* application. That's the client part that will connect to an ONLYOFFICE server.
- Then in Settings -> ONLYOFFICE (`https://__DOMAIN____PATH__/settings/admin/onlyoffice`), if you want to configure which file formats should be opened by ONLYOFFICE.
- Here you go :) You should be able to create new type of documents and open them.
*NB: ONLYOFFICE Nextcloud App is only available for x86 architecture - for **ARM** architecture (Raspberry Pi, OLinuXino...), consider the YunoHost App below*

View file

@ -1,17 +1,18 @@
### How to use CLI commande
### Comment utiliser la commande CLI
`sudo -u __APP__ php__YNH_PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ...`
ou utilisez `sudo yunohost app shell __APP__` puis `php occ ...`
### Configurer l'intégration d'ONLYOFFICE
#### Avec l'application Nextcloud (pas de support ARM, performances limitées)
À partir de sa version 18, Nextcloud inclut une intégration directe de ONLYOFFICE (un éditeur de texte enrichi en ligne) via une application Nextcloud.
Nextcloud inclut une intégration directe de ONLYOFFICE (un éditeur de texte enrichi en ligne) via une application Nextcloud.
Pour l'installer et la configurer :
- Installez l'application *Community Document Server* dans votre Nextcloud. C'est la partie qui fait tourner un serveur ONLYOFFICE.
- Installez l'application *ONLYOFFICE*. C'est la partie cliente qui va se connecter au serveur ONLYOFFICE.
- Ensuite dans les Paramètres -> ONLYOFFICE (`https://__DOMAIN____PATH__/settings/admin/onlyoffice`), si vous voulez configurer quels formats de fichier s'ouvrent avec ONLYOFFICE.
- Et voilà :) Vous devriez pouvoir créer de nouveaux types de documents, et les ouvrir.
*NB : l'app Nextcloud ONLYOFFICE Community Document Server n'est disponible que sous architecture x86 - Pour un support de l'architecture **ARM** (Raspberry Pi, OLinuXino...), installez plutôt l'App YunoHost, voir ci-dessous*

View file

@ -5,7 +5,7 @@ name = "Nextcloud"
description.en = "Online storage, file sharing platform and various other applications"
description.fr = "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
version = "27.1.2~ynh1"
version = "27.1.3~ynh1"
maintainers = ["kay0u"]

View file

@ -4,18 +4,6 @@
# COMMON FUCTIONS
#=================================================
# Define a function to add an external storage
# Create the external storage for the given folders and enable sharing
create_external_storage() {
local datadir="$1"
local mount_name="$2"
local mount_id=$(exec_occ files_external:create --output=json \
"$mount_name" 'local' 'null::null' -c "datadir=$data_dir/data" || true)
! [[ $mount_id =~ ^[0-9]+$ ]] \
&& ynh_print_warn --message="Unable to create external storage" \
|| exec_occ files_external:option "$mount_id" enable_sharing true
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -17,6 +17,7 @@ maintenance_mode=0
fpm_footprint="high"
fpm_free_footprint=0
fpm_usage="medium"
phpflags="--define apc.enable_cli=1"
#=================================================
# STORE SETTINGS FROM MANIFEST
@ -26,6 +27,7 @@ ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
ynh_app_setting_set --app=$app --key=phpflags --value=$phpflags
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -143,6 +145,18 @@ exec_occ ldap:test-config '' \
# MOUNT HOME FOLDERS AS EXTERNAL STORAGE
#=================================================
# Define a function to add an external storage
# Create the external storage for the given folders and enable sharing
create_external_storage() {
local datadir="$1"
local mount_name="$2"
local mount_id=`exec_occ files_external:create --output=json \
"$mount_name" 'local' 'null::null' -c "datadir=$data_dir/data" || true`
! [[ $mount_id =~ ^[0-9]+$ ]] \
&& ynh_print_warn --message="Unable to create external storage" \
|| exec_occ files_external:option "$mount_id" enable_sharing true
}
# Enable External Storage and create local mount to home folder
if [ $user_home -eq 1 ]
then

View file

@ -47,6 +47,12 @@ if [ -z "${fpm_usage:-}" ]; then
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
fi
# If phpflags doesn't exist, create it
if [ -z "${phpflags:-}" ]; then
phpflags="--define apc.enable_cli=1"
ynh_app_setting_set --app=$app --key=phpflags --value=$phpflags
fi
# Delete existing ini configuration file (backward compatibility)
if [ -f /etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini ]; then
ynh_secure_remove --file=/etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini
@ -134,6 +140,19 @@ then
ynh_store_file_checksum --file="${install_dir}/config/config.php"
fi
# Define a function to add an external storage
# Create the external storage for the given folders and enable sharing
create_external_storage() {
local datadir="$1"
local mount_name="$2"
local mount_id=$(exec_occ files_external:create --output=json \
"$mount_name" 'local' 'null::null' -c "datadir=$data_dir/data" || true)
! [[ $mount_id =~ ^[0-9]+$ ]] \
&& ynh_print_warn --message="Unable to create external storage" \
|| exec_occ files_external:option "$mount_id" enable_sharing true
}
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading Nextcloud..." --weight=3
@ -272,6 +291,9 @@ EOF
# Enable LDAP plugin
exec_occ app:enable user_ldap
# Update all installed apps
exec_occ app:update --all
# Load the config file in nextcloud
exec_occ config:import "$nc_conf"

View file

@ -1,7 +1,7 @@
#!/bin/bash
# Last available Nextcloud version
next_version="27.1.2"
next_version="27.1.3"
# Nextcloud tarball checksum sha256
nextcloud_source_sha256="0742b247aaee0b7044db0062f0a914aa77338c7a7d8fe7da0917147d76689721"
nextcloud_source_sha256="1d614935245e4a375b4ac991c02f323592b753972f86f88763fd80ed7d275793"

View file

@ -7,8 +7,5 @@ test_format = 1.0
# -------------------------------
test_upgrade_from.c5cf91ad.name = "Upgrade from 25.0.2"
test_upgrade_from.d02166a5.name = "Upgrade from 26.0.1"
test_upgrade_from.caf917f3.name = "Upgrade from 26.0.2"
test_upgrade_from.0f16f720.name = "Upgrade from 27.0.2"