restore esrom service
This commit is contained in:
parent
65672c72b0
commit
dd0a6dcd22
3 changed files with 31 additions and 1 deletions
|
@ -5,6 +5,10 @@ networks:
|
||||||
traefik:
|
traefik:
|
||||||
external: true
|
external: true
|
||||||
|
|
||||||
|
configs:
|
||||||
|
services:
|
||||||
|
file: /srv/traefik/services.yml
|
||||||
|
|
||||||
services:
|
services:
|
||||||
traefik:
|
traefik:
|
||||||
image: traefik:3.0
|
image: traefik:3.0
|
||||||
|
@ -22,6 +26,12 @@ services:
|
||||||
- traefik.http.routers.dashboard.rule=Host(`maestro.dmz`)
|
- traefik.http.routers.dashboard.rule=Host(`maestro.dmz`)
|
||||||
- traefik.http.routers.dashboard.service=api@internal
|
- traefik.http.routers.dashboard.service=api@internal
|
||||||
- traefik.http.services.dummy-svc.loadbalancer.server.port=8080
|
- traefik.http.services.dummy-svc.loadbalancer.server.port=8080
|
||||||
|
|
||||||
|
- traefik.http.routers.esrom.entrypoints=websecure
|
||||||
|
- traefik.http.routers.esrom.service=esrom@file
|
||||||
|
- traefik.http.routers.esrom.rule=Host(`geokunis2.nl`)
|
||||||
|
- traefik.http.routers.esrom.tls=true
|
||||||
|
- traefik.http.routers.esrom.tls.certresolver=letsencrypt
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: /var/run/docker.sock
|
source: /var/run/docker.sock
|
||||||
|
@ -29,20 +39,29 @@ services:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: /mnt/data/traefik/acme.json
|
source: /mnt/data/traefik/acme.json
|
||||||
target: /acme.json
|
target: /acme.json
|
||||||
|
configs:
|
||||||
|
- source: services
|
||||||
|
target: /etc/traefik/services.yml
|
||||||
command:
|
command:
|
||||||
- --providers.docker
|
- --providers.docker
|
||||||
- --providers.docker.swarmmode
|
- --providers.docker.swarmmode
|
||||||
- --providers.docker.watch
|
- --providers.docker.watch
|
||||||
|
- --providers.docker.exposedbydefault=false
|
||||||
|
|
||||||
|
- --providers.file.filename=/etc/traefik/services.yml
|
||||||
|
|
||||||
- --api
|
- --api
|
||||||
- --api.insecure=true
|
- --api.insecure=true
|
||||||
- --api.dashboard=true
|
- --api.dashboard=true
|
||||||
|
|
||||||
- --entrypoints.web.address=:80
|
- --entrypoints.web.address=:80
|
||||||
- --entrypoints.web.http.redirections.entrypoint=true
|
- --entrypoints.web.http.redirections.entrypoint=true
|
||||||
- --entrypoints.web.http.redirections.entrypoint.to=websecure
|
- --entrypoints.web.http.redirections.entrypoint.to=websecure
|
||||||
- --entrypoints.web.http.redirections.entrypoint.scheme=https
|
- --entrypoints.web.http.redirections.entrypoint.scheme=https
|
||||||
- --entrypoints.web.http.redirections.entrypoint.permanent=true
|
- --entrypoints.web.http.redirections.entrypoint.permanent=true
|
||||||
|
|
||||||
- --entrypoints.websecure.address=:443
|
- --entrypoints.websecure.address=:443
|
||||||
- --providers.docker.exposedbydefault=false
|
|
||||||
- --certificatesresolvers.letsencrypt.acme=true
|
- --certificatesresolvers.letsencrypt.acme=true
|
||||||
- --certificatesresolvers.letsencrypt.acme.email=pim@kunis.nl
|
- --certificatesresolvers.letsencrypt.acme.email=pim@kunis.nl
|
||||||
- --certificatesresolvers.letsencrypt.acme.httpchallenge=true
|
- --certificatesresolvers.letsencrypt.acme.httpchallenge=true
|
||||||
|
|
6
ansible/roles/traefik/services.yml
Normal file
6
ansible/roles/traefik/services.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
http:
|
||||||
|
services:
|
||||||
|
esrom:
|
||||||
|
loadBalancer:
|
||||||
|
servers:
|
||||||
|
- url: http://esrom.dmz:80/
|
|
@ -3,6 +3,11 @@
|
||||||
name: traefik
|
name: traefik
|
||||||
driver: overlay
|
driver: overlay
|
||||||
|
|
||||||
|
- name: Copy services definition
|
||||||
|
copy:
|
||||||
|
src: "{{ role_path }}/services.yml"
|
||||||
|
dest: /srv/traefik/services.yml
|
||||||
|
|
||||||
- name: Create working directory
|
- name: Create working directory
|
||||||
file:
|
file:
|
||||||
path: /srv/traefik
|
path: /srv/traefik
|
||||||
|
|
Reference in a new issue