Update conf to use file provider instead http provider
This commit is contained in:
parent
0f82e179af
commit
6ff4c4050d
6 changed files with 12 additions and 17 deletions
|
@ -8,6 +8,7 @@ server:
|
||||||
vpn:
|
vpn:
|
||||||
subnet: 192.168.1.0/24
|
subnet: 192.168.1.0/24
|
||||||
ip: 192.168.1.254
|
ip: 192.168.1.254
|
||||||
|
reverse_proxy_ip: 192.168.1.254
|
||||||
port: 22
|
port: 22
|
||||||
peers: test
|
peers: test
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
loop:
|
loop:
|
||||||
- { src: 'docker-compose.yml', dest: 'docker-compose.yml' }
|
- { src: 'docker-compose.yml', dest: 'docker-compose.yml' }
|
||||||
- { src: 'config/traefik.yml', dest: 'config/traefik.yml' }
|
- { src: 'config/traefik.yml', dest: 'config/traefik.yml' }
|
||||||
- { src: 'config/dynamic_conf.yaml', dest: 'config/dynamic_conf.yaml' }
|
- { src: 'config/dynamic_conf.yml', dest: 'config/dynamic_conf.yml' }
|
||||||
register: traefik_copy_templates_results
|
register: traefik_copy_templates_results
|
||||||
|
|
||||||
- name: Create proxy network
|
- name: Create proxy network
|
||||||
|
|
|
@ -38,8 +38,9 @@ providers:
|
||||||
docker:
|
docker:
|
||||||
endpoint: "unix:///var/run/docker.sock"
|
endpoint: "unix:///var/run/docker.sock"
|
||||||
exposedByDefault: false
|
exposedByDefault: false
|
||||||
http:
|
file:
|
||||||
endpoint: "http://http_provider/dynamic_conf.yaml"
|
filename: /dynamic_conf.yml
|
||||||
|
watch: true
|
||||||
|
|
||||||
certificatesResolvers:
|
certificatesResolvers:
|
||||||
sslResolver:
|
sslResolver:
|
||||||
|
|
|
@ -8,14 +8,16 @@ services:
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
networks:
|
networks:
|
||||||
- providers
|
proxy: {}
|
||||||
- proxy
|
vpn:
|
||||||
|
ipv4_address: {{ server.vpn.reverse_proxy_ip }}
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
- ./config/traefik.yml:/traefik.yml:ro
|
- ./config/traefik.yml:/traefik.yml:ro
|
||||||
|
- ./config/dynamic_conf.yml:/dynamic_conf.yml:ro
|
||||||
- {{ server.work_dir }}/traefik/base/acme.json:/acme.json:rw
|
- {{ server.work_dir }}/traefik/base/acme.json:/acme.json:rw
|
||||||
- {{ server.work_dir }}/traefik/base/access.log:/var/log/traefik/access.log:rw
|
- {{ server.work_dir }}/traefik/base/access.log:/var/log/traefik/access.log:rw
|
||||||
- {{ server.work_dir }}/traefik/base/traefik.log:/var/log/traefik/traefik.log:rw
|
- {{ server.work_dir }}/traefik/base/traefik.log:/var/log/traefik/traefik.log:rw
|
||||||
|
@ -108,18 +110,9 @@ services:
|
||||||
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
|
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
|
||||||
- "traefik.docker.network=proxy"
|
- "traefik.docker.network=proxy"
|
||||||
|
|
||||||
http_provider:
|
|
||||||
image: httpd:latest
|
|
||||||
restart: unless-stopped
|
|
||||||
container_name: http_provider
|
|
||||||
networks:
|
|
||||||
- internal
|
|
||||||
- providers
|
|
||||||
volumes:
|
|
||||||
- ./config/dynamic_conf.yaml:/usr/local/apache2/htdocs/dynamic_conf.yaml
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
providers:
|
|
||||||
internal:
|
internal:
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
external: true
|
||||||
|
vpn:
|
||||||
|
external: true
|
||||||
|
|
|
@ -13,7 +13,7 @@ services:
|
||||||
- "traefik.http.routers.whoami-secure.rule=Host(`whoami.{{ server.domain }}`)"
|
- "traefik.http.routers.whoami-secure.rule=Host(`whoami.{{ server.domain }}`)"
|
||||||
- "traefik.http.routers.whoami-secure.tls=true"
|
- "traefik.http.routers.whoami-secure.tls=true"
|
||||||
- "traefik.http.routers.whoami-secure.tls.certresolver=sslResolver"
|
- "traefik.http.routers.whoami-secure.tls.certresolver=sslResolver"
|
||||||
- "traefik.http.routers.whoami-secure.middlewares=private-network@http"
|
- "traefik.http.routers.whoami-secure.middlewares=private-network@file"
|
||||||
- "traefik.docker.network=proxy"
|
- "traefik.docker.network=proxy"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|
Loading…
Reference in a new issue