1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

Use domain for mail stack and hard code main path as it static

This commit is contained in:
Josué Tille 2024-02-23 18:22:40 +01:00
parent eea366884d
commit 99e4fcb21b
No known key found for this signature in database
GPG key ID: 5F259226AD51F2F5
3 changed files with 3 additions and 6 deletions

View file

@ -2260,7 +2260,7 @@ password_providers:
email: email:
# The hostname of the outgoing SMTP server to use. Defaults to 'localhost'. # The hostname of the outgoing SMTP server to use. Defaults to 'localhost'.
# #
smtp_host: "__MAIN_DOMAIN__" smtp_host: "__DOMAIN__"
# The port on the mail server for outgoing SMTP. Defaults to 25. # The port on the mail server for outgoing SMTP. Defaults to 25.
# #

View file

@ -1,4 +1,4 @@
location __BASE_API_URL__/ { location /_matrix/ {
proxy_pass http://localhost:__PORT_SYNAPSE__; proxy_pass http://localhost:__PORT_SYNAPSE__;
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
@ -8,7 +8,7 @@ location __BASE_API_URL__/ {
} }
# Use the specific path for the php file. It's more secure than global php path # Use the specific path for the php file. It's more secure than global php path
location __BASE_API_URL__/cas_server.php { location /_matrix/cas_server.php/ {
alias /var/www/__APP__/; alias /var/www/__APP__/;
fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_pass unix:/run/php/php__PHPVERSION__-fpm-__NAME__.sock;

View file

@ -1,8 +1,5 @@
python_version="$(python3 -V | cut -d' ' -f2 | cut -d. -f1-2)" python_version="$(python3 -V | cut -d' ' -f2 | cut -d. -f1-2)"
main_domain=$(yunohost domain main-domain --output-as plain)
code_dir="/opt/yunohost/matrix-$app" code_dir="/opt/yunohost/matrix-$app"
base_api_url="/_matrix"
install_sources() { install_sources() {
# Install/upgrade synapse in virtualenv # Install/upgrade synapse in virtualenv