docker-synapse.minervajuppiter.net

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 5ed31ae0c14cf073e9cb6921603ae3d915c475ee
parent 286b18d4530de68e1c4b76325fb1c27db13fa8b4
Author: minerva-jupiter <ryouturn@gmail.com>
Date:   Sat, 13 Dec 2025 19:17:48 +0900

add nginx

Diffstat:
Mdocker-compose.yaml | 36++++++++++++++----------------------
Anginx.conf | 19+++++++++++++++++++
2 files changed, 33 insertions(+), 22 deletions(-)

diff --git a/docker-compose.yaml b/docker-compose.yaml @@ -2,7 +2,6 @@ # adjustments to run properly with stack. services: - synapse: build: context: ../.. @@ -27,27 +26,8 @@ services: # In order to expose Synapse, remove one of the following, you might for # instance expose the TLS port directly: ports: - - 8448:8448/tcp - - 8008:8008/tcp - # ... or use a reverse proxy, here is an example for traefik: -# labels: -# # The following lines are valid for Traefik version 1.x: -# - traefik.enable=true -# - traefik.frontend.rule=Host:my.matrix.Host -# - traefik.port=8008 -# # Alternatively, for Traefik version 2.0: -# - traefik.enable=true -# - traefik.http.routers.http-synapse.entryPoints=http -# - traefik.http.routers.http-synapse.rule=Host(`my.matrix.host`) -# - traefik.http.middlewares.https_redirect.redirectscheme.scheme=https -# - traefik.http.middlewares.https_redirect.redirectscheme.permanent=true -# - traefik.http.routers.http-synapse.middlewares=https_redirect -# - traefik.http.routers.https-synapse.entryPoints=https -# - traefik.http.routers.https-synapse.rule=Host(`my.matrix.host`) -# - traefik.http.routers.https-synapse.service=synapse -# - traefik.http.routers.https-synapse.tls=true -# - traefik.http.services.synapse.loadbalancer.server.port=8008 -# - traefik.http.routers.https-synapse.tls.certResolver=le-ssl + - 28448:28448/tcp + - 28008:28008/tcp db: image: docker.io/postgres:15-alpine @@ -63,3 +43,15 @@ services: - ./schemas:/var/lib/postgresql/data # .. or store them on some high performance storage for better results # - /path/to/ssd/storage:/var/lib/postgresql/data + + nginx: + image: nginx + restart: unless-stopped + depends_on: + - synapse + ports: + - 18065:18065 + - 18085:18085 + volumes: + - ./nginx.conf:/etc/nginx/conf.d/rp.conf:ro + - ./nginx.logdir:/var/log/nginx:rw diff --git a/nginx.conf b/nginx.conf @@ -0,0 +1,19 @@ + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + + # For the federation port + #listen 8448 ssl http2 default_server; + #listen [::]:8448 ssl http2 default_server; + + server_name docker-synapse.minervajuppiter.net; + + location ~ ^(/_matrix|/_synapse/client) { + proxy_pass http://localhost:28008; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $host; + client_max_body_size 50M; + } +}