diff --git a/README.md b/README.md index 6ca303b..4692a3f 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Subdomains: `matrix` `dimension` `maubot` Clone the repository: ``` -git clone https://codeberg.org/deathrow/synapse-docker-deployement +git clone https://git.anonymousland.org/anonymousland/synapse-docker-deployement ``` CD into the repository: diff --git a/docker-compose.yml b/docker-compose.yml index 19d0cdb..041bef8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,14 @@ -version: '3' +version: '3.7' +networks: + matrix: + registration: + dimension: + services: - synapse: build: ./images/synapse-docker - restart: always + restart: unless-stopped container_name: synapse user: "991:991" environment: @@ -27,7 +31,7 @@ services: image: docker.io/postgres:14.5-alpine container_name: postgres user: "70:70" - restart: always + restart: unless-stopped environment: - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} @@ -49,7 +53,7 @@ services: swag: image: ghcr.io/linuxserver/swag - restart: always + restart: unless-stopped container_name: swag cap_add: - NET_ADMIN @@ -70,11 +74,13 @@ services: networks: - matrix - registration + security_opt: + - no-new-privileges:true pantalaimon: build: ./images/pantalaimon container_name: pantalaimon - restart: always + restart: unless-stopped volumes: - ./pantalaimon_data:/data:Z depends_on: @@ -90,7 +96,7 @@ services: mjolnir: build: ./images/mjolnir container_name: mjolnir - restart: always + restart: unless-stopped volumes: - ./mjolnir:/data:Z depends_on: @@ -105,7 +111,7 @@ services: maubot: image: dock.mau.dev/maubot/maubot:latest container_name: maubot - restart: always + restart: unless-stopped volumes: - ./maubot:/data:Z networks: @@ -114,7 +120,7 @@ services: matrix-registration: build: ./images/synapse-captcha container_name: matrix-registration - restart: always + restart: unless-stopped command: [ "--config-path=/data/config.yaml", "serve" @@ -129,14 +135,14 @@ services: redis: image: redis:latest container_name: redis - restart: always + restart: unless-stopped networks: - matrix dimension: build: ./images/matrix-dimension container_name: dimension - restart: always + restart: unless-stopped volumes: - ./dimension:/data:Z depends_on: @@ -156,7 +162,7 @@ services: image: docker.io/postgres:14.5-alpine container_name: dimension_db user: "70:70" - restart: always + restart: unless-stopped environment: - POSTGRES_USER=${DIMENSION_DB_USER} - POSTGRES_PASSWORD=${DIMENSION_DB_PASSWORD} @@ -188,7 +194,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync5.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse ports: @@ -207,7 +212,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync4.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse ports: @@ -227,7 +231,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync3.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse ports: @@ -247,7 +250,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync2.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse ports: @@ -267,7 +269,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/sync1.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse ports: @@ -287,7 +288,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/additional2.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse ports: @@ -307,7 +307,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/additional1.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse networks: @@ -329,7 +328,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/event1.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse networks: @@ -351,7 +349,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/event2.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse networks: @@ -373,7 +370,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/worker4.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse networks: @@ -395,7 +391,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/worker3.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse networks: @@ -417,7 +412,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/worker2.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse networks: @@ -439,7 +433,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/worker1.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse networks: @@ -460,7 +453,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/federation3.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse networks: @@ -480,7 +472,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/federation2.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse networks: @@ -499,7 +490,6 @@ services: entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/federation1.yaml"] volumes: - ./files:/data:Z - - ./bridges:/bridges:Z depends_on: - synapse networks: @@ -507,10 +497,4 @@ services: security_opt: - no-new-privileges:true cap_drop: - - ALL - -networks: - matrix: - registration: - dimension: - \ No newline at end of file + - ALL \ No newline at end of file diff --git a/files/workers/additional1.yaml b/files/workers/additional1.yaml index 92f996c..1062f30 100644 --- a/files/workers/additional1.yaml +++ b/files/workers/additional1.yaml @@ -9,12 +9,13 @@ worker_main_http_uri: http://synapse:8008/ worker_log_config: /data/log/additional1.yaml worker_listeners: + - type: http port: 8081 - tls: false x_forwarded: true resources: - - names: [client, federation] + - names: [client] + compress: false - type: http port: 8034 diff --git a/files/workers/additional2.yaml b/files/workers/additional2.yaml index d76b4eb..08db784 100644 --- a/files/workers/additional2.yaml +++ b/files/workers/additional2.yaml @@ -9,12 +9,13 @@ worker_main_http_uri: http://synapse:8008/ worker_log_config: /data/log/additional2.yaml worker_listeners: + - type: http port: 8081 - tls: false x_forwarded: true resources: - - names: [client, federation] + - names: [client] + compress: false - type: http port: 8034 diff --git a/files/workers/event1.yaml b/files/workers/event1.yaml index 19f7c09..104a79e 100644 --- a/files/workers/event1.yaml +++ b/files/workers/event1.yaml @@ -8,6 +8,14 @@ worker_replication_http_port: 9093 worker_log_config: /data/log/event1.yaml worker_listeners: + + - type: http + port: 8081 + x_forwarded: true + resources: + - names: [client] + compress: false + - type: http port: 8034 resources: diff --git a/files/workers/event2.yaml b/files/workers/event2.yaml index 4135da6..c92a7ab 100644 --- a/files/workers/event2.yaml +++ b/files/workers/event2.yaml @@ -8,6 +8,14 @@ worker_replication_http_port: 9093 worker_log_config: /data/log/event2.yaml worker_listeners: + + - type: http + port: 8081 + x_forwarded: true + resources: + - names: [client] + compress: false + - type: http port: 8034 resources: