mirror of
https://github.com/YunoHost-Apps/conduit_ynh.git
synced 2024-09-03 18:16:30 +02:00
commit
61778d0ce0
12 changed files with 31 additions and 18 deletions
|
@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
Conduit is a lightweight open-source server implementation of the Matrix Specification with a focus on easy setup and low system requirements. That means you can make your own Conduit setup in just a few minutes.
|
||||
Conduit keeps things simple, it's a single binary with an embedded database and can be much faster than other server implementations in some cases.
|
||||
|
||||
**Shipped version:** 0.6.0~ynh4
|
||||
**Shipped version:** 0.6.0~ynh5
|
||||
## Documentation and resources
|
||||
|
||||
* Official app website: <https://conduit.rs/>
|
||||
|
|
|
@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
|||
Conduit est une implémentation de serveur open source légère de la spécification Matrix avec un accent sur une configuration facile et des exigences système faibles. Cela signifie que vous pouvez créer votre propre configuration Conduit en quelques minutes seulement.
|
||||
Conduit garde les choses simples, c'est un binaire unique avec une base de données intégrée et peut être beaucoup plus rapide que d'autres implémentations de serveur dans certains cas.
|
||||
|
||||
**Version incluse :** 0.6.0~ynh4
|
||||
**Version incluse :** 0.6.0~ynh5
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l’app : <https://conduit.rs/>
|
||||
|
|
|
@ -3,3 +3,12 @@ location /.well-known/matrix/server {
|
|||
add_header Content-Type application/json;
|
||||
add_header Access-Control-Allow-Origin '*';
|
||||
}
|
||||
location /.well-known/matrix/client {
|
||||
return 200 '{
|
||||
"m.homeserver": { "base_url": "https://__DOMAIN__" },
|
||||
"im.vector.riot.jitsi": {"preferredDomain": "jitsi.riot.im"},
|
||||
"im.vector.riot.e2ee": {"default": true }
|
||||
}';
|
||||
add_header Content-Type application/json;
|
||||
add_header Access-Control-Allow-Origin '*';
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Unit]
|
||||
Description=Conduit Matrix Server
|
||||
Description=Conduit: Matrix server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
|
|
|
@ -2,6 +2,7 @@ version = "1.0"
|
|||
|
||||
[main]
|
||||
name = "Conduit configuration"
|
||||
services = ["__APP__"]
|
||||
|
||||
[main.registration]
|
||||
name = "User registration"
|
||||
|
@ -11,7 +12,7 @@ name = "Conduit configuration"
|
|||
type = "boolean"
|
||||
yes = "true"
|
||||
no = "false"
|
||||
bind = "allow_registration:/var/www/__APP__/conduit.toml"
|
||||
bind = "allow_registration:__INSTALL_DIR__/conduit.toml"
|
||||
|
||||
[main.registration.federation]
|
||||
ask = "Allow Federation"
|
||||
|
@ -19,4 +20,4 @@ name = "Conduit configuration"
|
|||
yes = "true"
|
||||
no = "false"
|
||||
help = "Communicate with other homeservers of the Matrix Federation."
|
||||
bind = "allow_federation:/var/www/__APP__/conduit.toml"
|
||||
bind = "allow_federation:__INSTALL_DIR__/conduit.toml"
|
||||
|
|
|
@ -5,7 +5,7 @@ name = "Conduit"
|
|||
description.en = "Simple, fast and reliable chat server powered by Matrix"
|
||||
description.fr = "Serveur de chat simple, rapide et fiable alimenté par Matrix"
|
||||
|
||||
version = "0.6.0~ynh4"
|
||||
version = "0.6.0~ynh5"
|
||||
|
||||
maintainers = ["eric_G"]
|
||||
|
||||
|
@ -70,6 +70,8 @@ ram.runtime = "50M"
|
|||
|
||||
[resources.permissions]
|
||||
main.url = "/"
|
||||
main.show_tile = false
|
||||
|
||||
server_api.url = "__DOMAIN__/_matrix"
|
||||
server_api.label = "Server access for client apps."
|
||||
server_api.show_tile = false
|
||||
|
@ -86,5 +88,3 @@ ram.runtime = "50M"
|
|||
|
||||
[resources.ports]
|
||||
main.default = 6167
|
||||
tls.default = 8448
|
||||
tls.exposed = "TCP"
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
if [ "$registration" -eq 1 ]; then
|
||||
registration="true"
|
||||
else
|
||||
registration="false"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
|
@ -32,7 +32,7 @@ ynh_change_url_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -13,16 +13,12 @@ source /usr/share/yunohost/helpers
|
|||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
#=================================================
|
||||
|
||||
#server_name=$YNH_APP_ARG_SERVER_NAME
|
||||
registration=$YNH_APP_ARG_REGISTRATION
|
||||
federation="true"
|
||||
|
||||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
|
||||
#ynh_app_setting_set --app=$app --key=server_name --value=$server_name
|
||||
ynh_app_setting_set --app=$app --key=registration --value=$registration
|
||||
ynh_app_setting_set --app=$app --key=federation --value=$federation
|
||||
|
||||
#=================================================
|
||||
|
@ -78,7 +74,7 @@ chown $app:root "$install_dir/conduit.toml"
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -44,7 +44,7 @@ yunohost service add $app --description="Chat server powered by Matrix" --log="/
|
|||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
||||
|
||||
# Typically you only have either $app or php-fpm but not both at the same time...
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...)
|
||||
|
@ -69,7 +69,7 @@ yunohost service add $app --description="Chat server powered by Matrix" --log="/
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -13,4 +13,5 @@ test_format = 1.0
|
|||
# -------------------------------
|
||||
|
||||
args.server_name = "domain.tld"
|
||||
args.registration = false
|
||||
|
Loading…
Add table
Reference in a new issue