Currently I have a server that I run under traefik in dnsChallenge mode with OVH as provider.
I find myself having to host a domain name that belongs to another OVH account.
How can I configure a second OVH provider and especially how can I configure it with other environment variables?
version: "3.3"
services:
traefik:
image: "traefik:v2.4"
restart: always
container_name: "traefik"
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.dnschallenge=true"
- "--certificatesresolvers.myresolver.acme.dnschallenge.provider=ovh"
- "--certificatesresolvers.myresolver.acme.dnschallenge.delayBeforeCheck=60"
- "--certificatesresolvers.myresolver.acme.email=xxxxxxxxxxxxx"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
##### Test
#- "--certificatesresolvers.myresolver2.acme.dnschallenge=true"
#- "--certificatesresolvers.myresolver2.acme.dnschallenge.provider=ovh_2" <=== it's possible ?
#- "--certificatesresolvers.myresolver2.acme.dnschallenge.delayBeforeCheck=60"
#- "--certificatesresolvers.myresolver2.acme.email=xxxxxxxxxxxxx"
#- "--certificatesresolvers.myresolver2.acme.storage=/letsencrypt/acme2.json"
ports:
- "80:80"
- "443:443"
- "8080:8080"
environment:
- "OVH_ENDPOINT=xxxxxx"
- "OVH_APPLICATION_KEY=xxxxxxxx"
- "OVH_APPLICATION_SECRET=xxxxxxxx"
- "OVH_CONSUMER_KEY=xxxxxxxx"
#- "OVH_2_ENDPOINT=xxxxxx2"
#- "OVH_2_APPLICATION_KEY=xxxxxxxx2"
#- "OVH_2_APPLICATION_SECRET=xxxxxxxx2"
#- "OVH_2_CONSUMER_KEY=xxxxxxxx2"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
labels:
# global redirect to https
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
# middleware redirect
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
logging:
driver: ${LOG_DRIVER:-json-file}
options:
max-size: ${LOG_MAX_SIZE:-4m}
max-file: ${LOG_MAX_FILE:-10}