Bootstrap well known repo for matrix usage

This commit is contained in:
Luke Murphy 2020-06-29 17:05:02 +02:00
commit c54c7ea0ed
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
4 changed files with 54 additions and 0 deletions

1
README.md Normal file
View File

@ -0,0 +1 @@
# well-known-uris

40
compose.yml Normal file
View File

@ -0,0 +1,40 @@
---
version: "3.8"
services:
nginx:
image: "nginx:stable"
configs:
- source: matrix_conf
target: /etc/nginx/conf.d/matrix.conf
- source: matrix_server
target: /var/www/.well-known/matrix/server
volumes:
- "public:/var/www/app/public"
networks:
- proxy
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
- "traefik.http.services.well_known.loadbalancer.server.port=80"
- "traefik.http.routers.well_known.rule=(Host(`autonomic.zone`) && PathPrefix(`/.well-known`))"
- "traefik.http.routers.well_known.entrypoints=web-secure"
- "traefik.http.routers.well_known.tls.certresolver=production"
configs:
matrix_server:
name: well_known_matrix_server_v1
file: matrix/server
matrix_conf:
name: well_known_matrix_conf_v1
file: matrix/matrix.conf
networks:
proxy:
external: true
volumes:
public:

10
matrix/matrix.conf Normal file
View File

@ -0,0 +1,10 @@
server {
listen 80 default_server;
server_name autonomic.zone;
location /.well-known/matrix/ {
root /var/www/;
default_type application/json;
add_header Access-Control-Allow-Origin *;
}
}

3
matrix/server Normal file
View File

@ -0,0 +1,3 @@
{
"m.server": "matrix.autonomic.zone:443"
}