2020-09-21 15:47:31 +00:00
|
|
|
# Example of Docker Compose setup using Traefik reverse proxy
|
|
|
|
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
traefik:
|
|
|
|
image: traefik:v2.2.11
|
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
- 80:80
|
2020-09-27 20:06:57 +00:00
|
|
|
- 443:443
|
2020-09-21 15:47:31 +00:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
- ./traefik_data:/data
|
|
|
|
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"
|
|
|
|
# Define certificates
|
|
|
|
- "--certificatesResolvers.mytlschallenge.acme.email=root@example.com"
|
|
|
|
- "--certificatesResolvers.mytlschallenge.acme.storage=/data/acme.json"
|
|
|
|
- "--certificatesResolvers.mytlschallenge.acme.httpChallenge.entryPoint=web"
|
2020-09-27 19:55:22 +00:00
|
|
|
|
|
|
|
ghostream:
|
|
|
|
build: ..
|
|
|
|
restart: always
|
2020-09-29 12:54:04 +00:00
|
|
|
ports:
|
2020-09-29 14:04:16 +00:00
|
|
|
- 9710:9710/udp
|
2020-09-29 12:54:04 +00:00
|
|
|
- 10000-10005:10000-10005/udp
|
2020-09-27 20:06:57 +00:00
|
|
|
volumes:
|
2020-09-28 07:31:59 +00:00
|
|
|
- ./ghostream_data:/etc/ghostream:ro
|
2020-09-27 20:06:57 +00:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.ghostream.rule=Host(`stream.example.com`)"
|
|
|
|
- "traefik.http.routers.ghostream.entrypoints=websecure"
|
|
|
|
- "traefik.http.routers.ghostream.tls.certresolver=mytlschallenge"
|
|
|
|
- "traefik.http.routers.ghostream.service=ghostream"
|
|
|
|
- "traefik.http.services.ghostream.loadbalancer.server.port=8080"
|