yml to yaml. Removed DNS challenge enable env var.

This commit is contained in:
Christian Galo 2023-08-05 01:26:05 +00:00
parent 4bfce6517b
commit 22650d7d67
4 changed files with 11 additions and 37 deletions

View File

@ -1,26 +1,3 @@
# Traefik
[![Build Status](https://drone.autonomic.zone/api/badges/coop-cloud/traefik/status.svg)](https://drone.autonomic.zone/coop-cloud/traefik)
> https://docs.traefik.io
<!-- metadata -->
* **Category**: Utilities
* **Status**: ?
* **Image**: [`traefik`](https://hub.docker.com/_/traefik), 4, upstream
* **Healthcheck**: Yes
* **Backups**: No
* **Email**: N/A
* **Tests**: 2
* **SSO**: ? (Keycloak)
<!-- endmetadata -->
## Basic usage
1. Set up Docker Swarm and [`abra`]
2. `abra app new traefik`
3. `abra app YOURAPPDOMAIN config` - be sure to change `DOMAIN` to something that resolves to
your Docker swarm box
4. `abra app deploy YOURAPPDOMAIN`
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
Wiki Cafe's customized `abra` recipe for traefik.

View File

@ -10,15 +10,16 @@ services:
- "/var/run/docker.sock:/var/run/docker.sock"
- "letsencrypt:/etc/letsencrypt"
configs:
- source: traefik_yml
target: /etc/traefik/traefik.yml
- source: file_provider_yml
target: /etc/traefik/file-provider.yml
- source: traefik_yaml
target: /etc/traefik/traefik.yaml
- source: file_provider_yaml
target: /etc/traefik/file-provider.yaml
networks:
- proxy
environment:
- DASHBOARD_ENABLED
- LOG_LEVEL
- LETS_ENCRYPT_DNS_CHALLENGE_PROVIDER
healthcheck:
test: ["CMD", "traefik", "healthcheck"]
interval: 30s
@ -45,11 +46,11 @@ networks:
external: true
configs:
traefik_yml:
file: traefik.yml.tmpl
traefik_yaml:
file: traefik.yaml.tmpl
template_driver: golang
file_provider_yml:
file: file-provider.yml.tmpl
file_provider_yaml:
file: file-provider.yaml.tmpl
template_driver: golang
volumes:

View File

@ -9,7 +9,7 @@ providers:
network: proxy
swarmMode: true
file:
filename: /etc/traefik/file-provider.yml
filename: /etc/traefik/file-provider.yaml
api:
dashboard: {{ env "DASHBOARD_ENABLED" }}
@ -36,23 +36,19 @@ certificatesResolvers:
caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
httpChallenge:
entryPoint: web
{{ if eq (env "LETS_ENCRYPT_DNS_CHALLENGE_ENABLED") "1" }}
dnsChallenge:
provider: {{ (env "LETS_ENCRYPT_DNS_CHALLENGE_PROVIDER") }}
resolvers:
- "1.1.1.1:53"
- "8.8.8.8:53"
{{ end }}
production:
acme:
email: {{ env "LETS_ENCRYPT_EMAIL" }}
storage: /etc/letsencrypt/production-acme.json
httpChallenge:
entryPoint: web
{{ if eq (env "LETS_ENCRYPT_DNS_CHALLENGE_ENABLED") "1" }}
dnsChallenge:
provider: {{ (env "LETS_ENCRYPT_DNS_CHALLENGE_PROVIDER") }}
resolvers:
- "1.1.1.1:53"
- "8.8.8.8:53"
{{ end }}