mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
Merge branch 'master' into testing
This commit is contained in:
commit
cf539de3b2
17 changed files with 112 additions and 88 deletions
|
@ -19,7 +19,7 @@ It shall NOT be edited by hand.
|
||||||
Web-based cross-platform XMPP client
|
Web-based cross-platform XMPP client
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 0.24.1~ynh1
|
**Shipped version:** 0.25.1~ynh1
|
||||||
|
|
||||||
**Demo:** <https://nl.movim.eu/?login>
|
**Demo:** <https://nl.movim.eu/?login>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ No se debe editar a mano.
|
||||||
Web-based cross-platform XMPP client
|
Web-based cross-platform XMPP client
|
||||||
|
|
||||||
|
|
||||||
**Versión actual:** 0.24.1~ynh1
|
**Versión actual:** 0.25.1~ynh1
|
||||||
|
|
||||||
**Demo:** <https://nl.movim.eu/?login>
|
**Demo:** <https://nl.movim.eu/?login>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ EZ editatu eskuz.
|
||||||
Web-based cross-platform XMPP client
|
Web-based cross-platform XMPP client
|
||||||
|
|
||||||
|
|
||||||
**Paketatutako bertsioa:** 0.24.1~ynh1
|
**Paketatutako bertsioa:** 0.25.1~ynh1
|
||||||
|
|
||||||
**Demoa:** <https://nl.movim.eu/?login>
|
**Demoa:** <https://nl.movim.eu/?login>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main.
|
||||||
Client XMPP multiplateforme basé sur le Web
|
Client XMPP multiplateforme basé sur le Web
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 0.24.1~ynh1
|
**Version incluse :** 0.25.1~ynh1
|
||||||
|
|
||||||
**Démo :** <https://nl.movim.eu/?login>
|
**Démo :** <https://nl.movim.eu/?login>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ NON debe editarse manualmente.
|
||||||
Web-based cross-platform XMPP client
|
Web-based cross-platform XMPP client
|
||||||
|
|
||||||
|
|
||||||
**Versión proporcionada:** 0.24.1~ynh1
|
**Versión proporcionada:** 0.25.1~ynh1
|
||||||
|
|
||||||
**Demo:** <https://nl.movim.eu/?login>
|
**Demo:** <https://nl.movim.eu/?login>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
Web-based cross-platform XMPP client
|
Web-based cross-platform XMPP client
|
||||||
|
|
||||||
|
|
||||||
**分发版本:** 0.24.1~ynh1
|
**分发版本:** 0.25.1~ynh1
|
||||||
|
|
||||||
**演示:** <https://nl.movim.eu/?login>
|
**演示:** <https://nl.movim.eu/?login>
|
||||||
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
<?php
|
|
||||||
# This is the database configuration of Movim
|
|
||||||
# You need to copy an rename this file to 'db.inc.php' and complete the values
|
|
||||||
$conf = [
|
|
||||||
# The type can be 'pgsql' or 'mysql'
|
|
||||||
'type' => 'pgsql',
|
|
||||||
# The database username
|
|
||||||
'username' => '__DB_USER__',
|
|
||||||
# The password
|
|
||||||
'password' => '__DB_PWD__',
|
|
||||||
# Where can we find the database ?
|
|
||||||
'host' => 'localhost',
|
|
||||||
# The port number, 3306 for MySQL and 5432 for PostgreSQL
|
|
||||||
'port' => 5432,
|
|
||||||
# The database name
|
|
||||||
'database' => '__DB_NAME__'
|
|
||||||
];
|
|
14
conf/dot_env
Normal file
14
conf/dot_env
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Database configuration
|
||||||
|
DB_DRIVER=pgsql
|
||||||
|
DB_HOST=localhost
|
||||||
|
DB_PORT=5432
|
||||||
|
DB_DATABASE=__DB_NAME__
|
||||||
|
DB_USERNAME=__DB_USER__
|
||||||
|
DB_PASSWORD=__DB_PWD__
|
||||||
|
|
||||||
|
# Daemon configuration
|
||||||
|
DAEMON_URL=https://__DOMAIN____PATH__/
|
||||||
|
DAEMON_PORT=__PORT__
|
||||||
|
DAEMON_INTERFACE=127.0.0.1
|
||||||
|
DAEMON_DEBUG=false
|
||||||
|
DAEMON_VERBOSE=false
|
|
@ -4,15 +4,18 @@ location __PATH__/ {
|
||||||
# Path to source
|
# Path to source
|
||||||
alias __INSTALL_DIR__/public/;
|
alias __INSTALL_DIR__/public/;
|
||||||
|
|
||||||
more_set_headers "Access-Control-Allow-Origin: *";
|
|
||||||
|
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
try_files $uri $uri/ __PATH__/index.php;
|
||||||
client_max_body_size 100M;
|
|
||||||
|
|
||||||
try_files $uri $uri/ index.php;
|
|
||||||
location ~ [^/]\.php(/|$) {
|
location ~ [^/]\.php(/|$) {
|
||||||
|
# more_set_headers X-Cache $upstream_cache_status;
|
||||||
|
# fastcgi_ignore_headers "Cache-Control" "Expires" "Set-Cookie";
|
||||||
|
# fastcgi_cache nginx_cache;
|
||||||
|
# fastcgi_cache_valid any 7d;
|
||||||
|
# fastcgi_cache_bypass $no_cache;
|
||||||
|
# fastcgi_no_cache $no_cache;
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||||
|
|
||||||
|
@ -24,7 +27,7 @@ location __PATH__/ {
|
||||||
}
|
}
|
||||||
|
|
||||||
location __PATH__/ws/ {
|
location __PATH__/ws/ {
|
||||||
proxy_pass http://127.0.0.1:__PORT__;
|
proxy_pass http://127.0.0.1:__PORT__/;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "Upgrade";
|
proxy_set_header Connection "Upgrade";
|
||||||
|
@ -33,11 +36,8 @@ location __PATH__/ {
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto https;
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
proxy_read_timeout 1800s;
|
||||||
# To avoid disconnecting after 60sec :
|
proxy_send_timeout 1800s;
|
||||||
proxy_read_timeout 14400s;
|
|
||||||
proxy_send_timeout 14400s;
|
|
||||||
# (14400s is 4h)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
|
|
|
@ -6,10 +6,8 @@ After=nginx.service network.target local-fs.target
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
Environment=PUBLIC_URL=https://__DOMAIN____PATH__/
|
|
||||||
Environment=WS_PORT=__PORT__
|
|
||||||
WorkingDirectory=__INSTALL_DIR__/
|
WorkingDirectory=__INSTALL_DIR__/
|
||||||
ExecStart=/usr/bin/php__PHPVERSION__ daemon.php start --url=${PUBLIC_URL} --port=${WS_PORT}
|
ExecStart=/usr/bin/php__PHPVERSION__ daemon.php start
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
SyslogIdentifier=__APP__
|
SyslogIdentifier=__APP__
|
||||||
PIDFile=/run/movim.pid
|
PIDFile=/run/movim.pid
|
||||||
|
|
|
@ -1 +1,6 @@
|
||||||
The app can be configured at <https://__DOMAIN____PATH__/?admin> using the username and password defined during the installation.
|
A Jabber user can be set as admin by running this command (they need to login once before):
|
||||||
|
```
|
||||||
|
sudo -u __APP__ php__PHPVERSION__ __INSTALL_DIR__/daemon.php setAdmin <your jabber id>
|
||||||
|
```
|
||||||
|
|
||||||
|
The app can be configured at <https://__DOMAIN____PATH__/?admin>.
|
||||||
|
|
|
@ -1 +1,6 @@
|
||||||
L'application peut être configurée sur <https://__DOMAIN____PATH__/?admin> en utilisant le nom d'utilisateur et le mot de passe définis lors de l'installation.
|
Un utilisateur Jabber peut être mis admini via cette commande (iel doit s'être loggué une fois avant):
|
||||||
|
```
|
||||||
|
sudo -u __APP__ php__PHPVERSION__ __INSTALL_DIR__/daemon.php setAdmin <your jabber id>
|
||||||
|
```
|
||||||
|
|
||||||
|
L'application peut être configurée sur <https://__DOMAIN____PATH__/?admin>.
|
||||||
|
|
6
doc/POST_INSTALL.md
Normal file
6
doc/POST_INSTALL.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
No user was set as admin! You need to login once, and then run this command:
|
||||||
|
```
|
||||||
|
sudo -u __APP__ php__PHPVERSION__ __INSTALL_DIR__/daemon.php setAdmin <your jabber id>
|
||||||
|
```
|
||||||
|
|
||||||
|
As described here: https://github.com/movim/movim/blob/master/INSTALL.md .
|
|
@ -7,7 +7,7 @@ name = "Movim"
|
||||||
description.en = "Decentralized social platform based on XMPP"
|
description.en = "Decentralized social platform based on XMPP"
|
||||||
description.fr = "Plateforme sociale décentralisée basée sur XMPP"
|
description.fr = "Plateforme sociale décentralisée basée sur XMPP"
|
||||||
|
|
||||||
version = "0.24.1~ynh1"
|
version = "0.25.1~ynh1"
|
||||||
|
|
||||||
maintainers = []
|
maintainers = []
|
||||||
|
|
||||||
|
@ -36,24 +36,15 @@ ram.runtime = "50M"
|
||||||
[install.domain]
|
[install.domain]
|
||||||
type = "domain"
|
type = "domain"
|
||||||
|
|
||||||
[install.path]
|
|
||||||
type = "path"
|
|
||||||
default = "/movim"
|
|
||||||
|
|
||||||
[install.init_main_permission]
|
[install.init_main_permission]
|
||||||
type = "group"
|
type = "group"
|
||||||
default = "visitors"
|
default = "visitors"
|
||||||
|
|
||||||
[install.admin]
|
|
||||||
type = "user"
|
|
||||||
|
|
||||||
[install.password]
|
|
||||||
type = "password"
|
|
||||||
|
|
||||||
[resources]
|
[resources]
|
||||||
[resources.sources.main]
|
[resources.sources.main]
|
||||||
url = "https://github.com/movim/movim/archive/refs/tags/v0.24.1.tar.gz"
|
url = "https://github.com/movim/movim/archive/refs/tags/v0.25.1.tar.gz"
|
||||||
sha256 = "4a596a2aae517be58f185dfd56a182235a9373d524b7e3272d044d4c9805b940"
|
sha256 = "94692ef5effcf5a42b340fdc2cb9e2d0cb43824fdef82f9cc4a0c4d5c6c80d35"
|
||||||
|
|
||||||
autoupdate.strategy = "latest_github_tag"
|
autoupdate.strategy = "latest_github_tag"
|
||||||
|
|
||||||
[resources.ports]
|
[resources.ports]
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
YNH_COMPOSER_VERSION="2.6.5"
|
YNH_COMPOSER_VERSION="2.7.7"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
|
|
|
@ -23,6 +23,7 @@ ynh_app_setting_set --app="$app" --key=fpm_usage --value="$fpm_usage"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring $app's PostgreSQL database..."
|
ynh_script_progression --message="Configuring $app's PostgreSQL database..."
|
||||||
|
|
||||||
|
# FIXME: is it actually required?
|
||||||
ynh_psql_execute_as_root --database="$db_name" --sql="CREATE EXTENSION IF NOT EXISTS unaccent;"
|
ynh_psql_execute_as_root --database="$db_name" --sql="CREATE EXTENSION IF NOT EXISTS unaccent;"
|
||||||
ynh_psql_execute_as_root --database="$db_name" --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;"
|
ynh_psql_execute_as_root --database="$db_name" --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;"
|
||||||
|
|
||||||
|
@ -34,6 +35,12 @@ ynh_script_progression --message="Setting up source files..."
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
|
# Patch call to php in composer
|
||||||
|
ynh_replace_string -f "$install_dir/composer.json" --match_string='"vendor/bin/phinx' --replace_string='"@php vendor/bin/phinx'
|
||||||
|
|
||||||
|
# Patch call to php in daemon code
|
||||||
|
ynh_replace_string -f "$install_dir/src/Movim/Daemon/Session.php" --match_string="exec php" --replace_string="exec php$phpversion"
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R "$app:www-data" "$install_dir"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
|
||||||
|
@ -42,10 +49,10 @@ chown -R "$app:www-data" "$install_dir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding $app's configuration file..."
|
ynh_script_progression --message="Adding $app's configuration file..."
|
||||||
|
|
||||||
ynh_add_config --template="db.example.inc.php" --destination="$install_dir/config/db.inc.php"
|
ynh_add_config --template="dot_env" --destination="$install_dir/.env"
|
||||||
|
|
||||||
chmod 400 "$install_dir/config/db.inc.php"
|
chmod 400 "$install_dir/.env"
|
||||||
chown "$app:$app" "$install_dir/config/db.inc.php"
|
chown "$app:$app" "$install_dir/.env"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BUILD MOVIM
|
# BUILD MOVIM
|
||||||
|
@ -55,8 +62,9 @@ ynh_script_progression --message="Building Movim..."
|
||||||
# Install composer
|
# Install composer
|
||||||
ynh_install_composer
|
ynh_install_composer
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_composer_exec --commands="movim:migrate"
|
COMPOSER_ALLOW_SUPERUSER=1 ynh_exec_warn_less ynh_composer_exec --commands="movim:migrate"
|
||||||
ynh_exec_as "$app" "php$phpversion" "$install_dir/daemon.php" config --username="$admin" --password="$password" --quiet
|
chmod -R o-rwx "$install_dir"
|
||||||
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
|
|
|
@ -37,13 +37,27 @@ if [ -z "${fpm_usage:-}" ]; then
|
||||||
ynh_app_setting_set --app="$app" --key=fpm_usage --value="$fpm_usage"
|
ynh_app_setting_set --app="$app" --key=fpm_usage --value="$fpm_usage"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f "$install_dir/config/db.inc.php" ]; then
|
||||||
|
ynh_secure_remove --file="$install_dir/config/db.inc.php"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${path:-}" ]] && [[ "${path:-}" != "/" ]]; then
|
||||||
|
ynh_die --message="Movim can't be installed in a subdir anymore. Please change_url to the root of a domain before upgrading."
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading source files..."
|
ynh_script_progression --message="Upgrading source files..."
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config/db.inc.php"
|
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env"
|
||||||
|
|
||||||
|
# Patch call to php in composer
|
||||||
|
ynh_replace_string -f "$install_dir/composer.json" --match_string='"vendor/bin/phinx' --replace_string='"@php vendor/bin/phinx'
|
||||||
|
|
||||||
|
# Patch call to php in daemon code
|
||||||
|
ynh_replace_string -f "$install_dir/src/Movim/Daemon/Session.php" --match_string="exec php" --replace_string="exec php$phpversion"
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R "$app:www-data" "$install_dir"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
@ -53,10 +67,10 @@ chown -R "$app:www-data" "$install_dir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating $app's configuration file..."
|
ynh_script_progression --message="Updating $app's configuration file..."
|
||||||
|
|
||||||
ynh_add_config --template="db.example.inc.php" --destination="$install_dir/config/db.inc.php"
|
ynh_add_config --template="dot_env" --destination="$install_dir/.env"
|
||||||
|
|
||||||
chmod 400 "$install_dir/config/db.inc.php"
|
chmod 400 "$install_dir/.env"
|
||||||
chown "$app:$app" "$install_dir/config/db.inc.php"
|
chown "$app:$app" "$install_dir/.env"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BUILD MOVIM
|
# BUILD MOVIM
|
||||||
|
@ -65,9 +79,9 @@ ynh_script_progression --message="Building $app..."
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_install_composer
|
ynh_exec_warn_less ynh_install_composer
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_composer_exec --commands="config --global discard-changes true --quiet"
|
COMPOSER_ALLOW_SUPERUSER=1 ynh_exec_warn_less ynh_composer_exec --commands="config --global discard-changes true --quiet"
|
||||||
ynh_exec_warn_less ynh_composer_exec --commands="update --no-interaction --quiet"
|
COMPOSER_ALLOW_SUPERUSER=1 ynh_exec_warn_less ynh_composer_exec --commands="update --no-interaction --quiet"
|
||||||
ynh_exec_warn_less ynh_composer_exec --commands="movim:migrate --quiet"
|
COMPOSER_ALLOW_SUPERUSER=1 ynh_exec_warn_less ynh_composer_exec --commands="movim:migrate --quiet"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REAPPLY SYSTEM CONFIGURATIONS
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
|
|
Loading…
Reference in a new issue