I am trying to use the exec provider type with the lets encrypt go in a docker container. The error I am getting is:
2019-07-25T07:18:04.711127150Z time="2019-07-25T07:18:04Z" level=error msg="Unable to obtain ACME certificate for domains \"[domain]\" : unable to generate a certificate for the domains [domain]: acme: Error -> One or more domains had a problem:\n[domain] [domain] acme: error presenting token: fork/exec \"/etc/traefik/dynu.py\": no such file or directory\n"
I have a python script (dynu.py) that works correctly on the host - I have copied the script into my ${USERFOLDER}/traefik folder on the host and re-run docker-compose. My compose yaml specifies the EXEC_PATH environment variable and the volume linking /etc/traefik in the container to the path on the host. I've copied my compose details below. Any ideas?
traefik:
hostname: traefik
image: traefik:latest
container_name: traefik
restart: always
domainname: ${DOMAINNAME}
networks:
- default
- traefik_proxy
ports:
- "80:80"
- "443:443"
- "8080:8080"
environment:
- EXEC_PATH="/etc/traefik/dynu.py"
labels:
- "traefik.enable=true"
- "traefik.backend=traefik"
- "traefik.frontend.rule=Host:traefik.${DOMAINNAME}"
- "traefik.port=8080"
- "traefik.docker.network=traefik_proxy"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${USERDIR}/docker/traefik:/etc/traefik
- ${USERDIR}/docker/shared:/shared