mirror of
https://git.anonymousland.org/deathrow/synapse-docker-deployment.git
synced 2025-05-13 17:32:16 -04:00
Remove items not yet setup
This commit is contained in:
parent
c5ec38aaa1
commit
287ebb7d6d
10 changed files with 196 additions and 197 deletions
157
DockerTODO/docker-todo.yml
Normal file
157
DockerTODO/docker-todo.yml
Normal file
|
@ -0,0 +1,157 @@
|
||||||
|
sync5:
|
||||||
|
build: ./images/synapse-worker-docker
|
||||||
|
container_name: sync5
|
||||||
|
user: "991:991"
|
||||||
|
environment:
|
||||||
|
SYNAPSE_WORKER: synapse.app.generic_worker
|
||||||
|
restart: unless-stopped
|
||||||
|
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync5.yaml"]
|
||||||
|
volumes:
|
||||||
|
- ./files:/data:Z
|
||||||
|
depends_on:
|
||||||
|
- synapse
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
cap_drop:
|
||||||
|
- ALL
|
||||||
|
sync4:
|
||||||
|
build: ./images/synapse-worker-docker
|
||||||
|
container_name: sync4
|
||||||
|
user: "991:991"
|
||||||
|
environment:
|
||||||
|
SYNAPSE_WORKER: synapse.app.generic_worker
|
||||||
|
restart: unless-stopped
|
||||||
|
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync4.yaml"]
|
||||||
|
volumes:
|
||||||
|
- ./files:/data:Z
|
||||||
|
depends_on:
|
||||||
|
- synapse
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
cap_drop:
|
||||||
|
- ALL
|
||||||
|
|
||||||
|
sync3:
|
||||||
|
build: ./images/synapse-worker-docker
|
||||||
|
container_name: sync3
|
||||||
|
user: "991:991"
|
||||||
|
environment:
|
||||||
|
SYNAPSE_WORKER: synapse.app.generic_worker
|
||||||
|
restart: unless-stopped
|
||||||
|
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync3.yaml"]
|
||||||
|
volumes:
|
||||||
|
- ./files:/data:Z
|
||||||
|
depends_on:
|
||||||
|
- synapse
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
cap_drop:
|
||||||
|
- ALL
|
||||||
|
|
||||||
|
sync2:
|
||||||
|
build: ./images/synapse-worker-docker
|
||||||
|
container_name: sync2
|
||||||
|
user: "991:991"
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
SYNAPSE_WORKER: synapse.app.generic_worker
|
||||||
|
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync2.yaml"]
|
||||||
|
volumes:
|
||||||
|
- ./files:/data:Z
|
||||||
|
depends_on:
|
||||||
|
- synapse
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
cap_drop:
|
||||||
|
- ALL
|
||||||
|
|
||||||
|
sync1:
|
||||||
|
build: ./images/synapse-worker-docker
|
||||||
|
container_name: sync1
|
||||||
|
user: "991:991"
|
||||||
|
environment:
|
||||||
|
SYNAPSE_WORKER: synapse.app.generic_worker
|
||||||
|
restart: unless-stopped
|
||||||
|
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync1.yaml"]
|
||||||
|
volumes:
|
||||||
|
- ./files:/data:Z
|
||||||
|
depends_on:
|
||||||
|
- synapse
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
cap_drop:
|
||||||
|
- ALL
|
||||||
|
|
||||||
|
additional2:
|
||||||
|
build: ./images/workers/synapse
|
||||||
|
container_name: additional2
|
||||||
|
user: "991:991"
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
SYNAPSE_WORKER: synapse.app.generic_worker
|
||||||
|
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/additional2.yaml"]
|
||||||
|
volumes:
|
||||||
|
- ./files:/data:Z
|
||||||
|
depends_on:
|
||||||
|
- synapse
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
cap_drop:
|
||||||
|
- ALL
|
||||||
|
|
||||||
|
additional1:
|
||||||
|
build: ./images/workers/synapse
|
||||||
|
container_name: additional1
|
||||||
|
user: "991:991"
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
SYNAPSE_WORKER: synapse.app.generic_worker
|
||||||
|
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/additional1.yaml"]
|
||||||
|
volumes:
|
||||||
|
- ./files:/data:Z
|
||||||
|
depends_on:
|
||||||
|
- synapse
|
||||||
|
networks:
|
||||||
|
- matrix
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
cap_drop:
|
||||||
|
- ALL
|
||||||
|
|
||||||
|
event1:
|
||||||
|
build: ./images/workers/synapse
|
||||||
|
container_name: event1
|
||||||
|
user: "991:991"
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
SYNAPSE_WORKER: synapse.app.generic_worker
|
||||||
|
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/event1.yaml"]
|
||||||
|
volumes:
|
||||||
|
- ./files:/data:Z
|
||||||
|
depends_on:
|
||||||
|
- synapse
|
||||||
|
networks:
|
||||||
|
- matrix
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
cap_drop:
|
||||||
|
- ALL
|
||||||
|
|
||||||
|
event2:
|
||||||
|
build: ./images/workers/synapse
|
||||||
|
container_name: event2
|
||||||
|
user: "991:991"
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
SYNAPSE_WORKER: synapse.app.generic_worker
|
||||||
|
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/event2.yaml"]
|
||||||
|
volumes:
|
||||||
|
- ./files:/data:Z
|
||||||
|
depends_on:
|
||||||
|
- synapse
|
||||||
|
networks:
|
||||||
|
- matrix
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
cap_drop:
|
||||||
|
- ALL
|
39
DockerTODO/upstream
Normal file
39
DockerTODO/upstream
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
|
||||||
|
upstream additional1_worker_lc {
|
||||||
|
least_conn;
|
||||||
|
server additional1:8081;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream sso_worker_lc {
|
||||||
|
least_conn;
|
||||||
|
server synapse-generic-worker-4:8081;
|
||||||
|
}
|
||||||
|
|
||||||
|
# extract username from token get parameter
|
||||||
|
map $arg_access_token $token_from_arg {
|
||||||
|
default $arg_access_token;
|
||||||
|
"~syt_(?<username>.*?)_.*" $username;
|
||||||
|
}
|
||||||
|
|
||||||
|
# extract username part from bearer token, fallback to access_token
|
||||||
|
map $http_authorization $proxy_username_label {
|
||||||
|
default $http_authorization;
|
||||||
|
"~Bearer syt_(?<username>.*?)_.*" $username;
|
||||||
|
"" $token_from_arg;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
upstream sync_worker {
|
||||||
|
# pin with username extracted from bearer token or access_token
|
||||||
|
hash $proxy_username_label consistent;
|
||||||
|
server sync1:8081;
|
||||||
|
server sync2:8081;
|
||||||
|
server sync3:8081;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream sync_init {
|
||||||
|
# Use the username mapper result for hash key
|
||||||
|
hash $mxid_localpart consistent;
|
||||||
|
server sync4:8081;
|
||||||
|
server sync5:8081;
|
||||||
|
}
|
|
@ -184,164 +184,6 @@ services:
|
||||||
|
|
||||||
# WORKERS
|
# WORKERS
|
||||||
|
|
||||||
sync5:
|
|
||||||
build: ./images/synapse-worker-docker
|
|
||||||
container_name: sync5
|
|
||||||
user: "991:991"
|
|
||||||
environment:
|
|
||||||
SYNAPSE_WORKER: synapse.app.generic_worker
|
|
||||||
restart: unless-stopped
|
|
||||||
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync5.yaml"]
|
|
||||||
volumes:
|
|
||||||
- ./files:/data:Z
|
|
||||||
depends_on:
|
|
||||||
- synapse
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
cap_drop:
|
|
||||||
- ALL
|
|
||||||
sync4:
|
|
||||||
build: ./images/synapse-worker-docker
|
|
||||||
container_name: sync4
|
|
||||||
user: "991:991"
|
|
||||||
environment:
|
|
||||||
SYNAPSE_WORKER: synapse.app.generic_worker
|
|
||||||
restart: unless-stopped
|
|
||||||
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync4.yaml"]
|
|
||||||
volumes:
|
|
||||||
- ./files:/data:Z
|
|
||||||
depends_on:
|
|
||||||
- synapse
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
cap_drop:
|
|
||||||
- ALL
|
|
||||||
|
|
||||||
sync3:
|
|
||||||
build: ./images/synapse-worker-docker
|
|
||||||
container_name: sync3
|
|
||||||
user: "991:991"
|
|
||||||
environment:
|
|
||||||
SYNAPSE_WORKER: synapse.app.generic_worker
|
|
||||||
restart: unless-stopped
|
|
||||||
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync3.yaml"]
|
|
||||||
volumes:
|
|
||||||
- ./files:/data:Z
|
|
||||||
depends_on:
|
|
||||||
- synapse
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
cap_drop:
|
|
||||||
- ALL
|
|
||||||
|
|
||||||
sync2:
|
|
||||||
build: ./images/synapse-worker-docker
|
|
||||||
container_name: sync2
|
|
||||||
user: "991:991"
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
SYNAPSE_WORKER: synapse.app.generic_worker
|
|
||||||
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync2.yaml"]
|
|
||||||
volumes:
|
|
||||||
- ./files:/data:Z
|
|
||||||
depends_on:
|
|
||||||
- synapse
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
cap_drop:
|
|
||||||
- ALL
|
|
||||||
|
|
||||||
sync1:
|
|
||||||
build: ./images/synapse-worker-docker
|
|
||||||
container_name: sync1
|
|
||||||
user: "991:991"
|
|
||||||
environment:
|
|
||||||
SYNAPSE_WORKER: synapse.app.generic_worker
|
|
||||||
restart: unless-stopped
|
|
||||||
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync1.yaml"]
|
|
||||||
volumes:
|
|
||||||
- ./files:/data:Z
|
|
||||||
depends_on:
|
|
||||||
- synapse
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
cap_drop:
|
|
||||||
- ALL
|
|
||||||
|
|
||||||
additional2:
|
|
||||||
build: ./images/workers/synapse
|
|
||||||
container_name: additional2
|
|
||||||
user: "991:991"
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
SYNAPSE_WORKER: synapse.app.generic_worker
|
|
||||||
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/additional2.yaml"]
|
|
||||||
volumes:
|
|
||||||
- ./files:/data:Z
|
|
||||||
depends_on:
|
|
||||||
- synapse
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
cap_drop:
|
|
||||||
- ALL
|
|
||||||
|
|
||||||
additional1:
|
|
||||||
build: ./images/workers/synapse
|
|
||||||
container_name: additional1
|
|
||||||
user: "991:991"
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
SYNAPSE_WORKER: synapse.app.generic_worker
|
|
||||||
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/additional1.yaml"]
|
|
||||||
volumes:
|
|
||||||
- ./files:/data:Z
|
|
||||||
depends_on:
|
|
||||||
- synapse
|
|
||||||
networks:
|
|
||||||
- matrix
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
cap_drop:
|
|
||||||
- ALL
|
|
||||||
|
|
||||||
event1:
|
|
||||||
build: ./images/workers/synapse
|
|
||||||
container_name: event1
|
|
||||||
user: "991:991"
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
SYNAPSE_WORKER: synapse.app.generic_worker
|
|
||||||
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/event1.yaml"]
|
|
||||||
volumes:
|
|
||||||
- ./files:/data:Z
|
|
||||||
depends_on:
|
|
||||||
- synapse
|
|
||||||
networks:
|
|
||||||
- matrix
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
cap_drop:
|
|
||||||
- ALL
|
|
||||||
|
|
||||||
event2:
|
|
||||||
build: ./images/workers/synapse
|
|
||||||
container_name: event2
|
|
||||||
user: "991:991"
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
SYNAPSE_WORKER: synapse.app.generic_worker
|
|
||||||
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/event2.yaml"]
|
|
||||||
volumes:
|
|
||||||
- ./files:/data:Z
|
|
||||||
depends_on:
|
|
||||||
- synapse
|
|
||||||
networks:
|
|
||||||
- matrix
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
cap_drop:
|
|
||||||
- ALL
|
|
||||||
|
|
||||||
synapse-generic-worker-4:
|
synapse-generic-worker-4:
|
||||||
build: ./images/workers/synapse
|
build: ./images/workers/synapse
|
||||||
container_name: synapse-generic-worker-4
|
container_name: synapse-generic-worker-4
|
||||||
|
|
|
@ -13,42 +13,3 @@ upstream generic_worker_lc {
|
||||||
server synapse-generic-worker-3:8081;
|
server synapse-generic-worker-3:8081;
|
||||||
server synapse-generic-worker-4:8081;
|
server synapse-generic-worker-4:8081;
|
||||||
}
|
}
|
||||||
|
|
||||||
upstream additional1_worker_lc {
|
|
||||||
least_conn;
|
|
||||||
server additional1:8081;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream sso_worker_lc {
|
|
||||||
least_conn;
|
|
||||||
server synapse-generic-worker-4:8081;
|
|
||||||
}
|
|
||||||
|
|
||||||
# extract username from token get parameter
|
|
||||||
map $arg_access_token $token_from_arg {
|
|
||||||
default $arg_access_token;
|
|
||||||
"~syt_(?<username>.*?)_.*" $username;
|
|
||||||
}
|
|
||||||
|
|
||||||
# extract username part from bearer token, fallback to access_token
|
|
||||||
map $http_authorization $proxy_username_label {
|
|
||||||
default $http_authorization;
|
|
||||||
"~Bearer syt_(?<username>.*?)_.*" $username;
|
|
||||||
"" $token_from_arg;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
upstream sync_worker {
|
|
||||||
# pin with username extracted from bearer token or access_token
|
|
||||||
hash $proxy_username_label consistent;
|
|
||||||
server sync1:8081;
|
|
||||||
server sync2:8081;
|
|
||||||
server sync3:8081;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream sync_init {
|
|
||||||
# Use the username mapper result for hash key
|
|
||||||
hash $mxid_localpart consistent;
|
|
||||||
server sync4:8081;
|
|
||||||
server sync5:8081;
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue