INCOMPLETE: Synapse setup using delegation to set the server_name to jeanclaude.ch instead a subdomain. Currently the server still fails connect to any other server using federation.

This commit is contained in:
Jean-Claude 2020-04-13 20:57:43 +02:00
parent ad7c4b9700
commit 27d781ff62
7 changed files with 45 additions and 13 deletions

View File

@ -0,0 +1,3 @@
{
"m.server": "matrix.jeanclaudegraf.ch"
}

View File

@ -12,6 +12,7 @@ services:
volumes:
- wp-html:/var/www/html
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
- ../InjectAtDomain/.well-known/matrix/server:/var/www/html/.well-known/matrix/server
networks:
- ReverseProxy
- PortfolioWp

View File

@ -19,7 +19,7 @@ server {
listen [::]:443 ssl http2;
server_name matrix.jeanclaudegraf.ch;
include /etc/nginx/common.conf;
# include /etc/nginx/common.conf;
# SSL
include /etc/nginx/ssl.conf;
@ -30,8 +30,8 @@ server {
location /_matrix {
set $upstream synapse;
proxy_pass http://$upstream:8008;
include /etc/nginx/common_location.conf;
# proxy_set_header X-Forwarded-For $remote_addr;
# include /etc/nginx/common_location.conf;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
@ -40,7 +40,7 @@ server {
listen [::]:8448 ssl http2;
server_name matrix.jeanclaudegraf.ch;
include /etc/nginx/common.conf;
# include /etc/nginx/common.conf;
# SSL
include /etc/nginx/ssl.conf;
@ -51,7 +51,7 @@ server {
location / {
set $upstream synapse;
proxy_pass http://$upstream:8008;
include /etc/nginx/common_location.conf;
# proxy_set_header X-Forwarded-For $remote_addr;
# include /etc/nginx/common_location.conf;
proxy_set_header X-Forwarded-For $remote_addr;
}
}

5
Synapse/README.md Normal file
View File

@ -0,0 +1,5 @@
# Synapse Setup
## Important Points
- Generate `homeserver.yml`: `docker-compose run --rm -e SYNAPSE_SERVER_NAME=jeanclaudegraf.ch -e SYNAPSE_REPORT_STATS=no synapse generate`

1
Synapse/db.env_example Normal file
View File

@ -0,0 +1 @@
POSTGRES_PASSWORD=

View File

@ -5,15 +5,35 @@ services:
container_name: synapse
environment:
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
- TZ="Europe/Zurich"
- POSTGRES_USER=synapse
- POSTGRES_PASSWORD=
- POSTGRES_DB=synapse
# - POSTGRES_PORT=
- POSTGRES_HOST=synapse-db
- TZ=Europe/Zurich
env_file:
- ./syn.env
volumes:
- synapse-data:/data
- synapse:/data
networks:
- ReverseProxy
- Synapse
ports:
- 58448:8448
- 58008:8008
depends_on:
- synapse-db
synapse-db:
image: postgres:alpine
container_name: synapse-db
environment:
- POSTGRES_USER=synapse
- POSTGRES_DB=synapse
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
env_file:
- ./db.env
volumes:
- synapse-db:/var/lib/postgresql/data
networks:
- Synapse
networks:
ReverseProxy:
@ -22,5 +42,6 @@ networks:
Synapse:
volumes:
synapse-data:
external: true
synapse:
# external: true
synapse-db:

1
Synapse/syn.env_example Normal file
View File

@ -0,0 +1 @@
POSTGRES_PASSWORD=