Compare commits

...

12 Commits

Author SHA1 Message Date
dcc9ec543d chore: publish 2.0.0+v1.58.1 release 2022-05-12 17:26:14 +02:00
65a149eac3 add env vars for idp_id, allow_existing_users
Migrating from an idp old homeserver.yaml config could require to set
the idp_id to 'oidc' see this issue for reference:
https://github.com/matrix-org/synapse/issues/9514#issuecomment-788805476
2022-05-12 16:59:22 +02:00
6041ad6112 fix: use in to allow multiple overrides 2022-04-12 23:32:18 +02:00
1afa8cf7b7 chore: remove whitespace 2022-04-12 17:53:30 +02:00
b5831114f4 fix: thread RETENTION_MAX_LIFETIME & set to 1 month
Previously "1 minute" :/
2022-04-12 17:53:01 +02:00
02d78e9aa9 Merge pull request 'add comrade backupbot' (#28) from backupbot into main
Reviewed-on: https://git.coopcloud.tech/coop-cloud/matrix-synapse/pulls/28
2022-04-12 13:47:24 +00:00
af3c8fd252 add comrade backupbot 2022-04-12 15:29:56 +02:00
40d6b1df4e Add note about federation. 2022-04-06 16:07:31 +00:00
0378e8d89f bump homeserver.yaml version 2022-04-06 17:31:14 +02:00
c542629264 add SERVE_SERVER_WELLKNOWN variable
This config allows matrix-synapse to create a endpoint on
$DOMAIN/.well-known/matrix/server used for federation.
It's a straight forward way (no port opening required)
to enable federation if you are okay having a subdomain
(matrix.example.org) as your homeserver address.
2022-04-06 13:01:28 +02:00
005ce43f61 feat: encryption by default
See https://git.coopcloud.tech/coop-cloud/matrix-synapse/issues/22.
2022-04-03 19:25:19 +02:00
bca2a983c0 docs: more feedback on deploy 2022-03-31 17:56:04 +02:00
8 changed files with 48 additions and 11 deletions

View File

@ -15,6 +15,9 @@ COMPOSE_FILE="compose.yml"
#DISABLE_FEDERATION=1 #DISABLE_FEDERATION=1
# Set "true" to enable federation endpoint on $DOMAIN/.well-known/matrix/server
SERVE_SERVER_WELLKNOWN=false
ENABLE_REGISTRATION=false ENABLE_REGISTRATION=false
PASSWORD_LOGIN_ENABLED=true PASSWORD_LOGIN_ENABLED=true
@ -26,30 +29,34 @@ ROOT_LOG_LEVEL=WARN
REDACTION_RETENTION_PERIOD=7d REDACTION_RETENTION_PERIOD=7d
RETENTION_MAX_LIFETIME=1m RETENTION_MAX_LIFETIME=4w
ENABLE_3PID_LOOKUP=true ENABLE_3PID_LOOKUP=true
USER_IPS_MAX_AGE=1d USER_IPS_MAX_AGE=1d
ENCRYPTED_BY_DEFAULT=all
#ENABLE_ALLOWLIST=1 #ENABLE_ALLOWLIST=1
#FEDERATION_ALLOWLIST="[]" #FEDERATION_ALLOWLIST="[]"
#COMPOSE_FILE="compose.yml:compose.keycloak.yml" #COMPOSE_FILE="$COMPOSE_FILE:compose.keycloak.yml"
#KEYCLOAK_ENABLED=1 #KEYCLOAK_ENABLED=1
#KEYCLOAK_ID=keycloak
#KEYCLOAK_NAME= #KEYCLOAK_NAME=
#KEYCLOAK_URL= #KEYCLOAK_URL=
#KEYCLOAK_CLIENT_ID= #KEYCLOAK_CLIENT_ID=
#KEYCLOAK_CLIENT_DOMAIN= #KEYCLOAK_CLIENT_DOMAIN=
#KEYCLOAK_ALLOW_EXISTING_USERS=false
#SECRET_KEYCLOAK_CLIENT_SECRET_VERSION=v1 #SECRET_KEYCLOAK_CLIENT_SECRET_VERSION=v1
#COMPOSE_FILE="compose.yml:compose.turn.yml" #COMPOSE_FILE="$COMPOSE_FILE:compose.turn.yml"
#TURN_ENABLED=1 #TURN_ENABLED=1
#TURN_URIS="[\"turns:coturn.foo.zone?transport=udp\", \"turns:coturn.foo.zone?transport=tcp\"]" #TURN_URIS="[\"turns:coturn.foo.zone?transport=udp\", \"turns:coturn.foo.zone?transport=tcp\"]"
#TURN_ALLOW_GUESTS=true #TURN_ALLOW_GUESTS=true
#SECRET_TURN_SHARED_SECRET_VERSION=v1 #SECRET_TURN_SHARED_SECRET_VERSION=v1
#COMPOSE_FILE="compose.yml:compose.smtp.yml" #COMPOSE_FILE="$COMPOSE_FILE:compose.smtp.yml"
#SMTP_ENABLED=1 #SMTP_ENABLED=1
#SMTP_APP_NAME= #SMTP_APP_NAME=
#SMTP_FROM= #SMTP_FROM=

View File

@ -34,6 +34,12 @@
- use `DISABLE_FEDERATION=1` to turn off federation listeners - use `DISABLE_FEDERATION=1` to turn off federation listeners
- don't use [`compose.matrix.yml`](https://git.coopcloud.tech/coop-cloud/traefik/src/branch/master/compose.matrix.yml) in your traefik config to keep the federation ports closed - don't use [`compose.matrix.yml`](https://git.coopcloud.tech/coop-cloud/traefik/src/branch/master/compose.matrix.yml) in your traefik config to keep the federation ports closed
### Enabling federation
See [`#27`](https://git.coopcloud.tech/coop-cloud/matrix-synapse/pulls/27) for more.
Depending on your setup, using `SERVE_SERVER_WELLKNOWN=true` might work to start federating.
### Seeing what changed in `homeserver.yaml` between versions ### Seeing what changed in `homeserver.yaml` between versions
Change the version range to suit your needs. Change the version range to suit your needs.

View File

@ -1,3 +1,3 @@
export ENTRYPOINT_CONF_VERSION=v1 export ENTRYPOINT_CONF_VERSION=v1
export HOMESERVER_YAML_VERSION=v6 export HOMESERVER_YAML_VERSION=v9
export LOG_CONFIG_VERSION=v2 export LOG_CONFIG_VERSION=v2

View File

@ -14,7 +14,9 @@ services:
- KEYCLOAK_CLIENT_ID - KEYCLOAK_CLIENT_ID
- KEYCLOAK_ENABLED - KEYCLOAK_ENABLED
- KEYCLOAK_NAME - KEYCLOAK_NAME
- KEYCLOAK_ID
- KEYCLOAK_URL - KEYCLOAK_URL
- KEYCLOAK_ALLOW_EXISTING_USERS
secrets: secrets:
keycloak_client_secret: keycloak_client_secret:

View File

@ -3,7 +3,7 @@ version: "3.8"
services: services:
app: app:
image: "matrixdotorg/synapse:v1.55.2" image: "matrixdotorg/synapse:v1.58.1"
volumes: volumes:
- "data:/data" - "data:/data"
secrets: secrets:
@ -12,6 +12,7 @@ services:
- macaroon_secret_key - macaroon_secret_key
- form_secret - form_secret
environment: environment:
- ENCRYPTED_BY_DEFAULT
- AUTO_JOIN_ROOM - AUTO_JOIN_ROOM
- AUTO_JOIN_ROOM_ENABLED - AUTO_JOIN_ROOM_ENABLED
- DISABLE_FEDERATION - DISABLE_FEDERATION
@ -24,6 +25,7 @@ services:
- PASSWORD_LOGIN_ENABLED - PASSWORD_LOGIN_ENABLED
- REDACTION_RETENTION_PERIOD - REDACTION_RETENTION_PERIOD
- ROOT_LOG_LEVEL - ROOT_LOG_LEVEL
- SERVE_SERVER_WELLKNOWN
- SQL_LOG_LEVEL - SQL_LOG_LEVEL
- STACK_NAME - STACK_NAME
- SYNAPSE_ADMIN_EMAIL - SYNAPSE_ADMIN_EMAIL
@ -32,6 +34,7 @@ services:
- USER_IPS_MAX_AGE - USER_IPS_MAX_AGE
- VIRTUAL_HOST=${DOMAIN} - VIRTUAL_HOST=${DOMAIN}
- VIRTUAL_PORT=8008 - VIRTUAL_PORT=8008
- RETENTION_MAX_LIFETIME
networks: networks:
- proxy - proxy
- internal - internal
@ -53,7 +56,7 @@ services:
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)" - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "coop-cloud.${STACK_NAME}.version=1.3.0+v1.55.2" - "coop-cloud.${STACK_NAME}.version=2.0.0+v1.58.1"
db: db:
image: postgres:13-alpine image: postgres:13-alpine
@ -72,6 +75,12 @@ services:
test: ["CMD", "pg_isready", "-U", "synapse"] test: ["CMD", "pg_isready", "-U", "synapse"]
volumes: volumes:
- postgres:/var/lib/postgresql/data - postgres:/var/lib/postgresql/data
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.pre-hook: "mkdir -p /tmp/backup/ && PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /tmp/backup/backup.sql"
backupbot.backup.post-hook: "rm -rf /tmp/backup"
backupbot.backup.path: "/tmp/backup/"
volumes: volumes:
data: data:

View File

@ -85,7 +85,7 @@ public_baseurl: https://{{ env "DOMAIN" }}/
# #
# Defaults to 'false'. # Defaults to 'false'.
# #
#serve_server_wellknown: true serve_server_wellknown: {{ env "SERVE_SERVER_WELLKNOWN" }}
# Set the soft limit on the number of file descriptors synapse can use # Set the soft limit on the number of file descriptors synapse can use
# Zero is used to indicate synapse should set the soft limit to the # Zero is used to indicate synapse should set the soft limit to the
@ -1885,12 +1885,13 @@ saml2_config:
oidc_providers: oidc_providers:
{{ if eq (env "KEYCLOAK_ENABLED") "1" }} {{ if eq (env "KEYCLOAK_ENABLED") "1" }}
- idp_id: keycloak - idp_id: {{ env "KEYCLOAK_ID" }}
idp_name: {{ env "KEYCLOAK_NAME" }} idp_name: {{ env "KEYCLOAK_NAME" }}
issuer: "{{ env "KEYCLOAK_URL" }}" issuer: "{{ env "KEYCLOAK_URL" }}"
client_id: "{{ env "KEYCLOAK_CLIENT_ID" }}" client_id: "{{ env "KEYCLOAK_CLIENT_ID" }}"
client_secret: "{{ secret "keycloak_client_secret" }}" client_secret: "{{ secret "keycloak_client_secret" }}"
scopes: ["openid", "profile"] scopes: ["openid", "profile"]
allow_existing_users: {{ env "KEYCLOAK_ALLOW_EXISTING_USERS" }}
user_mapping_provider: user_mapping_provider:
config: config:
localpart_template: "{{ "{{ user.preferred_username }}" }}" localpart_template: "{{ "{{ user.preferred_username }}" }}"
@ -2316,7 +2317,7 @@ push:
# Note that this option will only affect rooms created after it is set. It # Note that this option will only affect rooms created after it is set. It
# will also not affect rooms created by other servers. # will also not affect rooms created by other servers.
# #
#encryption_enabled_by_default_for_room_type: invite encryption_enabled_by_default_for_room_type: {{ env "ENCRYPTED_BY_DEFAULT" }}
# Uncomment to allow non-server-admin users to create groups on this server # Uncomment to allow non-server-admin users to create groups on this server

View File

@ -1,3 +1,6 @@
The deployment failed due to the app/db getting confused. I think this is just The deployment failed due to the app/db getting confused. I think this is just
due to the recipe not having good healthcheck config. After the app container due to the recipe not having good healthcheck config. After the app container
flapped a bit, everything came up nicely. d1 @ autonomic co-op flapped a bit, everything came up nicely. d1 @ autonomic co-op.
Same thing happened to me when deploying this for another instance. Also d1 @
autonomic co-op.

9
release/2.0.0+v1.58.1 Normal file
View File

@ -0,0 +1,9 @@
This upgrade adds new env variables for homeserver.yml, please add them to your .env file:
```
ENCRYPTED_BY_DEFAULT=all
SERVE_SERVER_WELLKNOWN=false
#KEYCLOAK_ID=keycloak
#KEYCLOAK_ALLOW_EXISTING_USERS=false
```