Compare commits
14 Commits
5.0.2+v1.9
...
6.0.2+v1.1
Author | SHA1 | Date | |
---|---|---|---|
8a37984e15 | |||
63a1abb2c0 | |||
86106b6b6f | |||
8250916051 | |||
e007bda255 | |||
951fc56434 | |||
6fe14edef7 | |||
a0a9c2b863 | |||
bdf8e11dc5 | |||
2658fed366 | |||
72b59ce4ad | |||
dfed1e54da | |||
d4ccb3588b | |||
11f70b7878 |
13
.env.sample
13
.env.sample
@ -73,6 +73,13 @@ RETENTION_MAX_LIFETIME=4w
|
|||||||
#MEDIA_RETENTION_LOCAL_LIFETIME=30d
|
#MEDIA_RETENTION_LOCAL_LIFETIME=30d
|
||||||
#MEDIA_RETENTION_REMOTE_LIFETIME=14d
|
#MEDIA_RETENTION_REMOTE_LIFETIME=14d
|
||||||
|
|
||||||
|
## Ratelimit
|
||||||
|
|
||||||
|
#LOGIN_LIMIT_IP_PER_SECOND=5
|
||||||
|
#LOGIN_LIMIT_IP_BURST=15
|
||||||
|
#LOGIN_LIMIT_ACCOUNT_PER_SECOND=1
|
||||||
|
#LOGIN_LIMIT_ACCOUNT_BURST=10
|
||||||
|
|
||||||
## Keycloak SSO
|
## Keycloak SSO
|
||||||
|
|
||||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.keycloak.yml"
|
#COMPOSE_FILE="$COMPOSE_FILE:compose.keycloak.yml"
|
||||||
@ -125,12 +132,12 @@ RETENTION_MAX_LIFETIME=4w
|
|||||||
#APP_SERVICE_BOT_USERNAME=telegrambot
|
#APP_SERVICE_BOT_USERNAME=telegrambot
|
||||||
#APP_SERVICE_DISPLAY_NAME="Telegram bridge bot"
|
#APP_SERVICE_DISPLAY_NAME="Telegram bridge bot"
|
||||||
#APP_SERVICE_ID=
|
#APP_SERVICE_ID=
|
||||||
#HOMESERVER_DOMAIN=
|
#HOMESERVER_DOMAIN=$DOMAIN
|
||||||
#HOMESERVER_URL=
|
#HOMESERVER_URL=https://$DOMAIN
|
||||||
#VERIFY_SSL=false
|
#VERIFY_SSL=false
|
||||||
#ENABLE_ENCRYPTION=true
|
#ENABLE_ENCRYPTION=true
|
||||||
#TELEGRAM_APP_ID=
|
#TELEGRAM_APP_ID=
|
||||||
#TELEGRAM_BRIDGE_PERMISSIONS="{ \"*\": \"relaybot\" }"
|
#TELEGRAM_BRIDGE_PERMISSIONS="{ \"*\": \"relaybot\", \"@foo:matrix.example.com\": \"admin\" }"
|
||||||
#TELEGRAM_SYNC_CHANNEL_MEMBERS=true
|
#TELEGRAM_SYNC_CHANNEL_MEMBERS=true
|
||||||
#SECRET_TELEGRAM_DB_PASSWORD_VERSION=v1
|
#SECRET_TELEGRAM_DB_PASSWORD_VERSION=v1
|
||||||
#SECRET_TELEGRAM_API_HASH_VERSION=v1
|
#SECRET_TELEGRAM_API_HASH_VERSION=v1
|
||||||
|
@ -47,7 +47,7 @@ You'll need to deploy something like [this](https://git.autonomic.zone/ruangrupa
|
|||||||
|
|
||||||
Setting it up is a bit of a chicken/egg & chasing cats moment.
|
Setting it up is a bit of a chicken/egg & chasing cats moment.
|
||||||
|
|
||||||
You need to get your bot setup on the telegram side first and have these values:
|
You need to get your bot setup on the telegram side first by creating a [telegram app](https://my.telegram.org/apps) and a [telegram bot](https://docs.mau.fi/bridges/python/telegram/relay-bot.html#setup) and have these values:
|
||||||
|
|
||||||
```
|
```
|
||||||
api_id: ...
|
api_id: ...
|
||||||
@ -55,7 +55,12 @@ api_hash: ...
|
|||||||
telegram_bot_token: ...
|
telegram_bot_token: ...
|
||||||
```
|
```
|
||||||
|
|
||||||
Here is a rough guide:
|
Also:
|
||||||
|
- Make sure to uncomment `APP_SERVICES_ENABLED`
|
||||||
|
- include the registration in synapse: `APP_SERVICE_CONFIGS="[\"/telegram-data/registration.yaml\"]"`
|
||||||
|
- and set yourself as admin under `TELEGRAM_BRIDGE_PERMISSIONS`
|
||||||
|
|
||||||
|
A rough guide for the following steps:
|
||||||
|
|
||||||
```
|
```
|
||||||
abra app secret insert <domain> telegram_api_hash v1 <secret>
|
abra app secret insert <domain> telegram_api_hash v1 <secret>
|
||||||
|
6
abra.sh
6
abra.sh
@ -1,11 +1,11 @@
|
|||||||
export DISCORD_BRIDGE_YAML_VERSION=v2
|
export DISCORD_BRIDGE_YAML_VERSION=v2
|
||||||
export ENTRYPOINT_CONF_VERSION=v1
|
export ENTRYPOINT_CONF_VERSION=v2
|
||||||
export HOMESERVER_YAML_VERSION=v26
|
export HOMESERVER_YAML_VERSION=v28
|
||||||
export LOG_CONFIG_VERSION=v2
|
export LOG_CONFIG_VERSION=v2
|
||||||
export SHARED_SECRET_AUTH_VERSION=v1
|
export SHARED_SECRET_AUTH_VERSION=v1
|
||||||
export SIGNAL_BRIDGE_YAML_VERSION=v4
|
export SIGNAL_BRIDGE_YAML_VERSION=v4
|
||||||
export TELEGRAM_BRIDGE_YAML_VERSION=v6
|
export TELEGRAM_BRIDGE_YAML_VERSION=v6
|
||||||
export NGINX_CONFIG_VERSION=v5
|
export NGINX_CONFIG_VERSION=v6
|
||||||
export WK_SERVER_VERSION=v1
|
export WK_SERVER_VERSION=v1
|
||||||
export WK_CLIENT_VERSION=v1
|
export WK_CLIENT_VERSION=v1
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
environment:
|
environment:
|
||||||
- APP_SERVICES_ENABLED
|
- APP_SERVICES_ENABLED
|
||||||
- APP_SERVICE_CONFIGS
|
- APP_SERVICE_CONFIGS
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
- form_secret
|
- form_secret
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
secrets:
|
secrets:
|
||||||
- keycloak2_client_secret
|
- keycloak2_client_secret
|
||||||
environment:
|
environment:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
secrets:
|
secrets:
|
||||||
- keycloak3_client_secret
|
- keycloak3_client_secret
|
||||||
environment:
|
environment:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
environment:
|
environment:
|
||||||
- SHARED_SECRET_AUTH_ENABLED
|
- SHARED_SECRET_AUTH_ENABLED
|
||||||
secrets:
|
secrets:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
environment:
|
environment:
|
||||||
- APP_SERVICES_ENABLED
|
- APP_SERVICES_ENABLED
|
||||||
- APP_SERVICE_CONFIGS
|
- APP_SERVICE_CONFIGS
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
- form_secret
|
- form_secret
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
environment:
|
environment:
|
||||||
- APP_SERVICES_ENABLED
|
- APP_SERVICES_ENABLED
|
||||||
- APP_SERVICE_CONFIGS
|
- APP_SERVICE_CONFIGS
|
||||||
@ -10,7 +10,7 @@ services:
|
|||||||
- telegram-data:/telegram-data
|
- telegram-data:/telegram-data
|
||||||
|
|
||||||
telegrambridge:
|
telegrambridge:
|
||||||
image: dock.mau.dev/mautrix/telegram:v0.14.2
|
image: dock.mau.dev/mautrix/telegram:v0.15.1
|
||||||
depends_on:
|
depends_on:
|
||||||
- telegramdb
|
- telegramdb
|
||||||
configs:
|
configs:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
- form_secret
|
- form_secret
|
||||||
|
29
compose.yml
29
compose.yml
@ -2,12 +2,13 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
web:
|
||||||
image: nginx:1.23.3
|
image: nginx:1.25.3
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
- internal
|
- internal
|
||||||
environment:
|
environment:
|
||||||
|
- DOMAIN
|
||||||
- STACK_NAME
|
- STACK_NAME
|
||||||
- NGINX_ACCESS_LOG_LOCATION
|
- NGINX_ACCESS_LOG_LOCATION
|
||||||
- NGINX_ERROR_LOG_LOCATION
|
- NGINX_ERROR_LOG_LOCATION
|
||||||
@ -27,16 +28,14 @@ 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=5.0.2+v1.93.0"
|
|
||||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: curl -f http://synapse:8008/health || exit 1
|
test: curl -f http://${STACK_NAME}_app:8008/health || exit 1
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
retries: 20
|
retries: 20
|
||||||
|
|
||||||
synapse:
|
app:
|
||||||
image: "matrixdotorg/synapse:v1.93.0"
|
image: "matrixdotorg/synapse:v1.100.0"
|
||||||
volumes:
|
volumes:
|
||||||
- "data:/data"
|
- "data:/data"
|
||||||
secrets:
|
secrets:
|
||||||
@ -72,6 +71,10 @@ services:
|
|||||||
- USER_IPS_MAX_AGE
|
- USER_IPS_MAX_AGE
|
||||||
- VIRTUAL_HOST=${DOMAIN}
|
- VIRTUAL_HOST=${DOMAIN}
|
||||||
- VIRTUAL_PORT=8008
|
- VIRTUAL_PORT=8008
|
||||||
|
- LOGIN_LIMIT_IP_PER_SECOND=${LOGIN_LIMIT_IP_PER_SECOND:-0.003}
|
||||||
|
- LOGIN_LIMIT_IP_BURST=${LOGIN_LIMIT_IP_BURST:-5}
|
||||||
|
- LOGIN_LIMIT_ACCOUNT_PER_SECOND=${LOGIN_LIMIT_ACCOUNT_PER_SECOND:-0.003}
|
||||||
|
- LOGIN_LIMIT_ACCOUNT_BURST=${LOGIN_LIMIT_ACCOUNT_BURST:-5}
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
entrypoint: /docker-entrypoint.sh
|
entrypoint: /docker-entrypoint.sh
|
||||||
@ -83,6 +86,12 @@ services:
|
|||||||
- source: entrypoint_conf
|
- source: entrypoint_conf
|
||||||
target: /docker-entrypoint.sh
|
target: /docker-entrypoint.sh
|
||||||
mode: 0555
|
mode: 0555
|
||||||
|
deploy:
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
labels:
|
||||||
|
- "coop-cloud.${STACK_NAME}.version=6.0.2+v1.100.0"
|
||||||
|
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8008/health"]
|
test: ["CMD", "curl", "-f", "http://localhost:8008/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@ -115,9 +124,9 @@ services:
|
|||||||
deploy:
|
deploy:
|
||||||
labels:
|
labels:
|
||||||
backupbot.backup: "true"
|
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.pre-hook: "PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /var/lib/postgresql/data/backup.sql"
|
||||||
backupbot.backup.post-hook: "rm -rf /tmp/backup"
|
backupbot.backup.post-hook: "rm -r /var/lib/postgresql/data/backup.sql"
|
||||||
backupbot.backup.path: "/tmp/backup/"
|
backupbot.backup.path: "/var/lib/postgresql/data"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
data:
|
data:
|
||||||
|
@ -6,6 +6,7 @@ chown 991:991 /data
|
|||||||
|
|
||||||
if [[ ! -f /data/{{ env "DOMAIN" }}.signing.key ]]; then
|
if [[ ! -f /data/{{ env "DOMAIN" }}.signing.key ]]; then
|
||||||
/start.py generate
|
/start.py generate
|
||||||
|
chown -R 991:991 /data/*.config /data/*.key
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/start.py
|
/start.py
|
||||||
|
@ -23,7 +23,7 @@ serve_server_wellknown: {{ env "SERVE_SERVER_WELLKNOWN" }}
|
|||||||
allow_public_rooms_without_auth: false
|
allow_public_rooms_without_auth: false
|
||||||
|
|
||||||
# https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#allow_public_rooms_over_federation
|
# https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#allow_public_rooms_over_federation
|
||||||
allow_public_rooms_over_federation: {{ env "ALLOW_PUBLIC_ROOMS_FEDERATION" }}
|
allow_public_rooms_over_federation: {{ or (env "ALLOW_PUBLIC_ROOMS_FEDERATION") "true" }}
|
||||||
|
|
||||||
# https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#listeners
|
# https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#listeners
|
||||||
listeners:
|
listeners:
|
||||||
@ -267,3 +267,12 @@ forget_rooms_on_leave: true
|
|||||||
# https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#opentracing-1
|
# https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#opentracing-1
|
||||||
opentracing:
|
opentracing:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
# https://matrix-org.github.io/synapse/develop/usage/configuration/config_documentation.html#ratelimiting
|
||||||
|
rc_login:
|
||||||
|
address:
|
||||||
|
per_second: {{ env "LOGIN_LIMIT_IP_PER_SECOND" }}
|
||||||
|
burst_count: {{ env "LOGIN_LIMIT_IP_BURST" }}
|
||||||
|
account:
|
||||||
|
per_second: {{ env "LOGIN_LIMIT_ACCOUNT_PER_SECOND" }}
|
||||||
|
burst_count: {{ env "LOGIN_LIMIT_ACCOUNT_BURST" }}
|
||||||
|
@ -8,13 +8,13 @@ http {
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
|
||||||
access_log {{ env "NGINX_ACCESS_LOG_LOCATION" }};
|
access_log {{ or (env "NGINX_ACCESS_LOG_LOCATION") "/dev/null" }};
|
||||||
error_log {{ env "NGINX_ERROR_LOG_LOCATION" }};
|
error_log {{ or (env "NGINX_ERROR_LOG_LOCATION") "/dev/null" }};
|
||||||
|
|
||||||
server_name {{ env "DOMAIN" }};
|
server_name {{ env "DOMAIN" }};
|
||||||
|
|
||||||
location ~* ^(\/_matrix|\/_synapse\/client) {
|
location ~* ^(\/_matrix|\/_synapse\/client) {
|
||||||
proxy_pass http://{{ env "STACK_NAME"}}_synapse:8008;
|
proxy_pass http://{{ env "STACK_NAME"}}_app:8008;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_set_header X-Forwarded-Proto https;
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
@ -5,4 +5,6 @@ Copy the secrets:
|
|||||||
* `registration_shared_secret` to `registration`
|
* `registration_shared_secret` to `registration`
|
||||||
* `macaroon_secret_key` to `macaroon`
|
* `macaroon_secret_key` to `macaroon`
|
||||||
|
|
||||||
|
The easiest way to do this is to run `abra app run <matrix.example.com> app bash` BEFORE this upgrade, then `cat /run/secrets/registration_shared_secret`. If you haven't saved the secrets yet, and would like to, please Ctrl+C out of this upgrade and do that first.
|
||||||
|
|
||||||
Regeneration of these secrets should also work.
|
Regeneration of these secrets should also work.
|
||||||
|
@ -1,17 +1 @@
|
|||||||
An Nginx proxy has been configured as the entrypoint for Synapse. This is not
|
It's recommended not to upgrade / downgrade directly to this version (or other 5.y.z versions), because of service renaming which was reverted in 6.0.0+v1.100.0.
|
||||||
optional. This is done to counteract IP collection in Synapse itself. See more:
|
|
||||||
|
|
||||||
!!! You MUST undeploy your Synapse install before upgrading to this version !!!
|
|
||||||
|
|
||||||
This is because there have been a service rename in the recipe configuration:
|
|
||||||
|
|
||||||
* `app` -> `synapse`
|
|
||||||
|
|
||||||
This could break stuff in the recipe, so please report issues if you run into
|
|
||||||
anything!
|
|
||||||
|
|
||||||
https://git.coopcloud.tech/coop-cloud/matrix-synapse/issues/38
|
|
||||||
|
|
||||||
Thanks!
|
|
||||||
|
|
||||||
-- d1
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
take care when upgrading! You need to add two variables to your .env file:
|
Logging is now disabled by default. If you want to reënable it, set these options:
|
||||||
use the following if you don't want any access logs (including users' IP addresses):
|
|
||||||
NGINX_ACCESS_LOG_LOCATION="/dev/null"
|
|
||||||
NGINX_ERROR_LOG_LOCATION="/dev/null"
|
|
||||||
|
|
||||||
use the following if you want logs:
|
```
|
||||||
NGINX_ACCESS_LOG_LOCATION="/dev/stdout"
|
NGINX_ACCESS_LOG_LOCATION="/dev/stdout"
|
||||||
NGINX_ERROR_LOG_LOCATION="/dev/stderr"
|
NGINX_ERROR_LOG_LOCATION="/dev/stderr"
|
||||||
|
```
|
||||||
|
1
release/6.0.0+v1.100.0
Normal file
1
release/6.0.0+v1.100.0
Normal file
@ -0,0 +1 @@
|
|||||||
|
If you are upgrading from verison 5.y.z of this recipe, you will need to `undeploy` then `deploy`, because of a service rename which was reverted.
|
@ -1,8 +0,0 @@
|
|||||||
We had to rename some secrets: https://git.coopcloud.tech/coop-cloud/matrix-synapse/issues/35
|
|
||||||
|
|
||||||
Copy the secrets:
|
|
||||||
|
|
||||||
* `registration_shared_secret` to `registration`
|
|
||||||
* `macaroon_secret_key` to `macaroon`
|
|
||||||
|
|
||||||
Regeneration of these secrets should also work.
|
|
Reference in New Issue
Block a user