Upload files to "/"
compose file and nginx config for matrix dendrite server
This commit is contained in:
commit
c4cf4f124c
53
docker-compose.yml
Normal file
53
docker-compose.yml
Normal file
|
@ -0,0 +1,53 @@
|
|||
version: "3.4"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
hostname: postgres
|
||||
image: postgres:15-alpine
|
||||
restart: always
|
||||
volumes:
|
||||
# This will create a docker volume to persist the database files in.
|
||||
# If you prefer those files to be outside of docker, you'll need to change this.
|
||||
- ./dendrite_postgres_data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_PASSWORD: pass123
|
||||
POSTGRES_USER: dendrite
|
||||
POSTGRES_DATABASE: dendrite
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U dendrite"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- internal
|
||||
|
||||
monolith:
|
||||
hostname: monolith
|
||||
image: matrixdotorg/dendrite-monolith:latest
|
||||
ports:
|
||||
- 8008:8008
|
||||
- 8448:8448
|
||||
volumes:
|
||||
- ./config:/etc/dendrite
|
||||
# The following volumes use docker volumes, change this
|
||||
# if you prefer to have those files outside of docker.
|
||||
- ./dendrite_media:/var/dendrite/media
|
||||
- ./dendrite_jetstream:/var/dendrite/jetstream
|
||||
- ./dendrite_search_index:/var/dendrite/searchindex
|
||||
- ./:/mnt
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- internal
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
internal:
|
||||
attachable: true
|
||||
|
||||
volumes:
|
||||
dendrite_postgres_data:
|
||||
dendrite_media:
|
||||
dendrite_jetstream:
|
||||
dendrite_search_index:
|
70
private_matrix.fun
Normal file
70
private_matrix.fun
Normal file
|
@ -0,0 +1,70 @@
|
|||
server {
|
||||
if ($host = matrix.privateship.xyz) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
|
||||
server_name privateship.xyz;
|
||||
|
||||
# Redirect HTTP to HTTPS for Jellyfin
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
return 301 https://$host$request_uri;
|
||||
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
server_name matrix.privateship.xyz;
|
||||
|
||||
# SSL configuration for Matrix Dendrite
|
||||
listen [::]:443 ssl http2; # managed by Certbot
|
||||
listen 443 ssl http2; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/matrix.privateship.xyz/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/matrix.privateship.xyz/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
# Set client max body size to 1G
|
||||
client_max_body_size 500M;
|
||||
|
||||
location /_matrix {
|
||||
proxy_pass http://matrix.privateship.xyz:8008; # Assuming Matrix Dendrite container name is "matrix_dendrite"
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /.well-known/matrix/server {
|
||||
return 200 '{ "m.server": "matrix.privateship.xyz:443" }';
|
||||
}
|
||||
|
||||
location /.well-known/matrix/client {
|
||||
return 200 '{ "m.homeserver": { "base_url": "https://matrix.privateship.xyz" } }';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
server_name privateship.xyz;
|
||||
|
||||
# SSL configuration for Jellyfin
|
||||
listen [::]:443 ssl http2; # managed by Certbot
|
||||
listen 443 ssl http2; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/privateship.xyz-0001/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/privateship.xyz-0001/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
location / {
|
||||
proxy_pass http://0.0.0.0:8096; # Assuming Jellyfin container name is "jellyfin"
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user