Hello guys,
I try to understand how https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion works.
I’ve created my compose file, and services comes up without problems.
version: '2'
services:
nginx:
container_name: nginx
labels:
io.rancher.scheduler.global: 'true'
io.rancher.container.pull_image: always
io.rancher.scheduler.affinity:host_label: "id=s04"
io.rancher.sidekicks: nginx-gen, nginx-letsencrypt
image: nginx:latest
ports:
- 80:80
- 443:443
volumes:
- /etc/nginx/conf.d
- /etc/nginx/vhost.d
- /usr/share/nginx/html
- /mnt/nasOVH/nginx-ssl:/etc/nginx/certs:ro
nginx-gen:
container_name: gen
labels:
io.rancher.scheduler.global: 'true'
io.rancher.container.pull_image: always
io.rancher.scheduler.affinity:host_label: "id=s04"
build: http://xx.yy/Dockerfile
volumes_from:
- nginx
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
nginx-letsencrypt:
container_name: letsencrypt
labels:
io.rancher.scheduler.global: 'true'
io.rancher.container.pull_image: always
io.rancher.scheduler.affinity:host_label: "id=s04"
image: jrcs/letsencrypt-nginx-proxy-companion
volumes_from:
- nginx
environment:
- "NGINX_DOCKER_GEN_CONTAINER=gen"
- "ACME_CA_URI=https://acme-staging.api.letsencrypt.org/directory"
volumes:
- /mnt/nasOVH/nginx-ssl:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
i’ve 4 nodes in my Rancher cluster and i try this in one node.
But i’ve some problems to understand.
How to certs & proxy container on other nodes ? Because if i understand, it listen /var/run/docker.sock who is on my node n°4, if i start a container on node1, how can it work ?
2nd question, in the nginx-gen container when i see the logs :
02/03/2017 11:16:092017/03/02 10:16:09 Sending container 'nginx' signal '1'
02/03/2017 11:16:092017/03/02 10:16:09 Error sending signal to container: No such container: nginx
And … no config or ssl certificate are created.
I think i dismiss a step, but wich one ?
If somebody can help me …
Many thanks !