feat: add traefik router to docker swarm
This commit is contained in:
parent
d240fcc735
commit
7a0d18b97f
2 changed files with 121 additions and 7 deletions
43
files/docker/compose-traefik.yaml
Normal file
43
files/docker/compose-traefik.yaml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
version: '3'
|
||||
networks:
|
||||
reverse-proxy:
|
||||
external: true
|
||||
services:
|
||||
traefik:
|
||||
container_name: traefix-proxy
|
||||
image: 'traefik:latest'
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- reverse-proxy
|
||||
ports:
|
||||
- '80:80'
|
||||
- '443:443'
|
||||
- '8080:8080'
|
||||
healthcheck:
|
||||
test: 'wget -qO- http://localhost:80/ping || exit 1'
|
||||
interval: 4s
|
||||
timeout: 2s
|
||||
retries: 5
|
||||
volumes:
|
||||
- '/var/run/docker.sock:/var/run/docker.sock:ro'
|
||||
- '/data/coolify/proxy:/traefik'
|
||||
command:
|
||||
- '--ping=true'
|
||||
- '--ping.entrypoint=http'
|
||||
- '--api.dashboard=true'
|
||||
- '--api.insecure=true'
|
||||
- '--entrypoints.http.address=:80'
|
||||
- '--entryPoints.http.forwardedHeaders.trustedIPs=10.0.10.0/24'
|
||||
- '--entrypoints.https.address=:443'
|
||||
- '--entryPoints.https.forwardedHeaders.trustedIPs=10.0.10.0/24'
|
||||
- '--entrypoints.http.http.encodequerysemicolons=true'
|
||||
- '--entryPoints.http.http2.maxConcurrentStreams=50'
|
||||
- '--entrypoints.https.http.encodequerysemicolons=true'
|
||||
- '--entryPoints.https.http2.maxConcurrentStreams=50'
|
||||
- '--providers.docker.exposedbydefault=false'
|
||||
- "--providers.swarm.endpoint=tcp://127.0.0.1:2377"
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.traefik.entrypoints=http
|
||||
- traefik.http.routers.traefik.service=api@internal
|
||||
- traefik.http.services.traefik.loadbalancer.server.port=8080
|
||||
Loading…
Add table
Add a link
Reference in a new issue