-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deploying: make traefik config self-sufficient, include well known
- Loading branch information
Showing
3 changed files
with
196 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,37 @@ | ||
# conduwuit - Traefik Reverse Proxy Labels | ||
|
||
services: | ||
homeserver: | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.docker.network=proxy" # Change this to the name of your Traefik docker proxy network | ||
|
||
- "traefik.http.routers.to-conduwuit.rule=Host(`<SUBDOMAIN>.<DOMAIN>`)" # Change to the address on which conduwuit is hosted | ||
- "traefik.http.routers.to-conduwuit.tls=true" | ||
- "traefik.http.routers.to-conduwuit.tls.certresolver=letsencrypt" | ||
- "traefik.http.routers.to-conduwuit.middlewares=cors-headers@docker" | ||
|
||
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowOriginList=*" | ||
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowHeaders=Origin, X-Requested-With, Content-Type, Accept, Authorization" | ||
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowMethods=GET, POST, PUT, DELETE, OPTIONS" | ||
|
||
# We need some way to server the client and server .well-known json. The simplest way is to use a nginx container | ||
# to serve those two as static files. If you want to use a different way, delete or comment the below service, here | ||
# and in the docker compose file. | ||
well-known: | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.docker.network=proxy" | ||
|
||
- "traefik.http.routers.to-matrix-wellknown.rule=Host(`<SUBDOMAIN>.<DOMAIN>`) && PathPrefix(`/.well-known/matrix`)" | ||
- "traefik.http.routers.to-matrix-wellknown.tls=true" | ||
- "traefik.http.routers.to-matrix-wellknown.tls.certresolver=letsencrypt" | ||
- "traefik.http.routers.to-matrix-wellknown.middlewares=cors-headers@docker" | ||
|
||
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowOriginList=*" | ||
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowHeaders=Origin, X-Requested-With, Content-Type, Accept, Authorization" | ||
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowMethods=GET, POST, PUT, DELETE, OPTIONS" | ||
|
||
|
||
### Uncomment this if you uncommented Element-Web App in the docker-compose.yml | ||
# element-web: | ||
# labels: | ||
# - "traefik.enable=true" | ||
# - "traefik.docker.network=proxy" # Change this to the name of your Traefik docker proxy network | ||
|
||
# - "traefik.http.routers.to-element-web.rule=Host(`<SUBDOMAIN>.<DOMAIN>`)" # Change to the address on which Element-Web is hosted | ||
# - "traefik.http.routers.to-element-web.tls=true" | ||
# - "traefik.http.routers.to-element-web.tls.certresolver=letsencrypt" | ||
homeserver: | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.docker.network=proxy" # Change this to the name of your Traefik docker proxy network | ||
|
||
- "traefik.http.routers.to-conduwuit.rule=Host(`<SUBDOMAIN>.<DOMAIN>`)" # Change to the address on which conduwuit is hosted | ||
- "traefik.http.routers.to-conduwuit.tls=true" | ||
- "traefik.http.routers.to-conduwuit.tls.certresolver=letsencrypt" | ||
- "traefik.http.routers.to-conduwuit.middlewares=cors-headers@docker" | ||
- "traefik.http.services.to_conduwuit.loadbalancer.server.port=6167" | ||
|
||
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowOriginList=*" | ||
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowHeaders=Origin, X-Requested-With, Content-Type, Accept, Authorization" | ||
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowMethods=GET, POST, PUT, DELETE, OPTIONS" | ||
|
||
# If you want to have your account on <DOMAIN>, but host conduwuit on a subdomain, | ||
# you can let it only handle the well known file on that domain instead | ||
#- "traefik.http.routers.to-matrix-wellknown.rule=Host(`<DOMAIN>`) && PathPrefix(`/.well-known/matrix`)" | ||
#- "traefik.http.routers.to-matrix-wellknown.tls=true" | ||
#- "traefik.http.routers.to-matrix-wellknown.tls.certresolver=letsencrypt" | ||
#- "traefik.http.routers.to-matrix-wellknown.middlewares=cors-headers@docker" | ||
|
||
### Uncomment this if you uncommented Element-Web App in the docker-compose.yml | ||
# element-web: | ||
# labels: | ||
# - "traefik.enable=true" | ||
# - "traefik.docker.network=proxy" # Change this to the name of your Traefik docker proxy network | ||
|
||
# - "traefik.http.routers.to-element-web.rule=Host(`<SUBDOMAIN>.<DOMAIN>`)" # Change to the address on which Element-Web is hosted | ||
# - "traefik.http.routers.to-element-web.tls=true" | ||
# - "traefik.http.routers.to-element-web.tls.certresolver=letsencrypt" | ||
|
||
# vim: ts=2:sw=2:expandtab | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters