mirror of
https://github.com/YunoHost-Apps/dendrite_ynh.git
synced 2024-09-03 18:25:58 +02:00
Merge branch 'testing' into ci-auto-update-v0.9.3
This commit is contained in:
commit
75c9a6a84b
7 changed files with 26 additions and 5 deletions
|
@ -5,11 +5,13 @@ location ~ ^/$ {
|
|||
}
|
||||
|
||||
location /.well-known/matrix/server {
|
||||
default_type application/json;
|
||||
return 200 '{ "m.server": "__DOMAIN__:443" }';
|
||||
}
|
||||
|
||||
location /.well-known/matrix/client {
|
||||
return 200 '{ "m.homeserver": { "base_url": "https://__DOMAIN__" } }';
|
||||
more_set_headers "Access-Control-Allow-Origin: *";
|
||||
}
|
||||
|
||||
location /_matrix {
|
||||
|
|
|
@ -7,7 +7,8 @@ Type=simple
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__FINALPATH__/
|
||||
ExecStart=__FINALPATH__/./bin/dendrite-monolith-server --tls-cert=/etc/yunohost/certs/__DOMAIN__/crt.pem --tls-key=/etc/yunohost/certs/__DOMAIN__/key.pem --config=dendrite.yaml --http-bind-address=:__PORT__ --https-bind-address=:__TLS_PORT__
|
||||
Environment="__YNH_GO_LOAD_PATH__"
|
||||
ExecStart=__FINALPATH__/bin/dendrite-monolith-server --tls-cert=/etc/yunohost/certs/__DOMAIN__/crt.pem --tls-key=/etc/yunohost/certs/__DOMAIN__/key.pem --config=dendrite.yaml --http-bind-address=:__PORT__ --https-bind-address=:__TLS_PORT__
|
||||
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||
StandardError=inherit
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source ynh_install_go
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -113,6 +114,9 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Updating systemd configuration..." --weight=1
|
||||
|
||||
# Load the Go environment path
|
||||
ynh_use_go
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
|
|
|
@ -65,6 +65,15 @@ ynh_app_setting_set --app=$app --key=tls_port --value=$tls_port
|
|||
# Open TLS port
|
||||
ynh_exec_warn_less yunohost firewall allow TCP $tls_port
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring system user..." --weight=1
|
||||
|
||||
# Create a system user
|
||||
# It needs to be created before using the ynh_install_go helper
|
||||
ynh_system_user_create --username=$app --use_shell --groups="ssl-cert"
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
|
@ -78,8 +87,7 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
|||
ynh_script_progression --message="Configuring system user..." --weight=1
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
adduser $app ssl-cert
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path" --groups="ssl-cert"
|
||||
|
||||
#=================================================
|
||||
# CREATE A POSTGRESQL DATABASE
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source ynh_install_go
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -60,6 +61,9 @@ ynh_script_progression --message="Removing the PostgreSQL database" --weight=2
|
|||
# Remove a database if it exists, along with the associated user
|
||||
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
|
||||
# Remove Go
|
||||
ynh_remove_go
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source ../settings/scripts/ynh_install_go
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -58,7 +59,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path" --groups="ssl-cert"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
|
@ -114,6 +115,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
ynh_use_go
|
||||
yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/Monolith.log" --needs_exposed_ports "$tls_port"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -99,7 +99,7 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue