Cause with compose V3 "volumes_from" is decrapted and mapping global volumes is the prefered way the Lets-Encrypt container is not able anymore the retriev the Nginx Proxy Container ID, see:
https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion/blob/master/app/entrypoint.sh#L28-L35
please provide a way to get the Container ID in another way, supported with compose v3!
Here my compose v3 example:
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
- "443:443"
environment:
- DEFAULT_HOST=berndklaus.at
volumes:
- certs:/etc/nginx/certs
- vhost:/etc/nginx/vhost.d
- nginx:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
deploy:
restart_policy:
condition: on-failure
delay: 3s
window: 30s
mode: global
update_config:
parallelism: 1
delay: 30s
nginx-letsencrypt:
image: JrCs/docker-letsencrypt-nginx-proxy-companion
volumes:
- certs:/etc/nginx/certs
- vhost:/etc/nginx/vhost.d
- nginx:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- nginx-proxy
deploy:
restart_policy:
condition: on-failure
delay: 120s
window: 30s
replicas: 1
update_config:
parallelism: 1
delay: 30s
volumes:
certs:
vhost:
nginx:
Error after starting the Stack:
Error: can't get nginx-proxy container id !
Check that you use the --volumes-from option to mount volumes from the nginx-proxy.
Sorry but i don't support docker-compose.
All the containers are start with a docker run command.
If someone else faces this issue, i can recommand https://traefik.io/.
deploying via compose v3 to a swarm will be imperative necessity feature
This works for me : https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion/issues/102#issuecomment-463573796
Most helpful comment
If someone else faces this issue, i can recommand https://traefik.io/.