1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 20:52:20 +00:00

Simplify traefik configuration

This commit is contained in:
Alexandre Iooss 2020-09-15 10:52:37 +02:00
parent aa5356a0c1
commit f916adc2b4
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
2 changed files with 13 additions and 30 deletions

View File

@ -12,11 +12,20 @@ services:
- 1935:1935
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik/traefik.yml:/etc/traefik/traefik.yml
- ./traefik_data:/data
labels:
# middleware hsts
- "traefik.http.middlewares.security_header.headers.stsPreload=true"
command:
# Read docker-compose labels but do not expose by default
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
# Define entrypoints
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.rtmpsecure.address=:1935"
# Define certificates
- "--certificatesResolvers.mytlschallenge.acme.email=root@example.com"
- "--certificatesResolvers.mytlschallenge.acme.storage=/data/acme.json"
- "--certificatesResolvers.mytlschallenge.acme.httpChallenge.entryPoint=web"
# RTMP to WebRTC server
ovenmediaengine:

View File

@ -1,26 +0,0 @@
providers:
docker:
# Do not expose containers by default
exposedbydefault: False
entryPoints:
web:
address: ":80"
http:
redirections:
entryPoint:
to: web-secure
scheme: https
websecure:
address: ":443"
rtmpsecure:
address: ":1935"
certificatesResolvers:
mytlschallenge:
acme:
email: root@example.com
storage: /data/acme.json
httpChallenge:
entryPoint: web