mirror of
https://github.com/xwiki-labs/cryptpad-docker.git
synced 2024-11-14 17:25:03 +00:00
29 lines
1.1 KiB
YAML
29 lines
1.1 KiB
YAML
---
|
|
version: '3.8'
|
|
|
|
services:
|
|
cryptpad:
|
|
labels:
|
|
## Enable traefik
|
|
- traefik.enable=true
|
|
|
|
## Declare service
|
|
## Change the port if you enabled TLS
|
|
- traefik.http.services.cpad.loadbalancer.server.port=80
|
|
|
|
# Configure middleware for http to https redirection
|
|
- traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
|
|
- traefik.http.middlewares.https-redirect.redirectscheme.permanent=true
|
|
- traefik.http.middlewares.https-redirect.redirectscheme.port=443
|
|
|
|
# HTTP router rules
|
|
- traefik.http.routers.cpad-http.entrypoints=http
|
|
- traefik.http.routers.cpad-http.rule=Host(`example.com`, `sandbox.example.com`)
|
|
- traefik.http.routers.cpad-http.middlewares=https-redirect
|
|
|
|
# HTTPS router rules
|
|
- traefik.http.routers.cpad-https.entrypoints=https
|
|
- traefik.http.routers.cpad-https.rule=Host(`example.com`, `sandbox.example.com`)
|
|
- traefik.http.routers.cpad-https.tls=true
|
|
- traefik.http.routers.cpad-https.tls.certresolver=letsencrypt
|
|
- traefik.http.routers.cpad-https.service=cpad
|