Files
tuwunel/docker-compose.yml
T

67 lines
2.1 KiB
YAML

services:
tuwunel:
image: ghcr.io/matrix-construct/tuwunel:latest
container_name: tuwunel
restart: unless-stopped
mem_limit: 512m
cpus: 0.5
expose:
- "8008"
environment:
TUWUNEL_SERVER_NAME: "mmdv-chats.dynv6.net"
TUWUNEL_DATABASE_PATH: "/var/lib/tuwunel"
TUWUNEL_PORT: "8008"
TUWUNEL_ADDRESS: "0.0.0.0"
TUWUNEL_ALLOW_REGISTRATION: "true"
TUWUNEL_REGISTRATION_TOKEN: "614f27b3a91e8c0456c9d82e7af0f58b"
TUWUNEL_ALLOW_FEDERATION: "true"
TUWUNEL_SHOW_ALL_LOCAL_USERS_IN_USER_DIRECTORY: "true"
TUWUNEL_TRUSTED_SERVERS: "[\"matrix.org\"]"
volumes:
- tuwunel-db:/var/lib/tuwunel
labels:
traefik.enable: "true"
traefik.http.routers.tuwunel-http.entrypoints: "https"
traefik.http.routers.tuwunel-http.rule: "Host(`mmdv-chats.dynv6.net`)"
traefik.http.routers.tuwunel-http.tls.certresolver: "letsencrypt"
traefik.http.routers.tuwunel-http.service: "tuwunel"
traefik.http.services.tuwunel.loadbalancer.server.port: "8008"
well-known:
image: nginx:alpine
container_name: tuwunel-wellknown
restart: unless-stopped
expose:
- "80"
command:
- sh
- -c
- |
mkdir -p /usr/share/nginx/html/.well-known/matrix
cat > /usr/share/nginx/html/.well-known/matrix/server <<'EOF'
{
"m.server": "mmdv-chats.dynv6.net"
}
EOF
cat > /usr/share/nginx/html/.well-known/matrix/client <<'EOF'
{
"m.homeserver": {
"base_url": "https://mmdv-chats.dynv6.net"
},
"m.identity_server": {
"base_url": "https://mmdv-chats.dynv6.net"
}
}
EOF
nginx -g 'daemon off;'
labels:
traefik.enable: "true"
traefik.http.routers.tuwunel-wk.entrypoints: "https"
traefik.http.routers.tuwunel-wk.rule: "Host(`mmdv-chats.dynv6.net`) && PathPrefix(`/.well-known`)"
traefik.http.routers.tuwunel-wk.tls.certresolver: "letsencrypt"
traefik.http.routers.tuwunel-wk.service: "tuwunel-wk"
traefik.http.services.tuwunel-wk.loadbalancer.server.port: "80"
volumes:
tuwunel-db: