Closed2
nginx-proxy/acme-companionコンテナが動くまで
acme-companionがnginx-proxyを見つけられていないっぽい
ubuntu
nginx-proxy-acme | Error: can't get nginx-proxy container ID !
nginx-proxy-acme | Check that you are doing one of the following :
nginx-proxy-acme | - Use the --volumes-from option to mount volumes from the nginx-proxy container.
nginx-proxy-acme | - Set the NGINX_PROXY_CONTAINER env var on the letsencrypt-companion container to the name of the nginx-proxy container.
nginx-proxy-acme | - Label the nginx-proxy container to use with 'com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy'.
compose.yaml
services:
nginx-proxy:
image: nginxproxy/nginx-proxy:1.6
container_name: nginx-proxy #これを追加
ports:
- 80:80
- 443:443
volumes:
- certs:/etc/nginx/certs:ro
- html:/usr/share/nginx/html
- ${DOCKER_HOST_ROOTLESS_PATH:-/var/run/docker.sock}:/tmp/docker.sock:ro
nginx-proxy-acme:
image: nginxproxy/acme-companion:2.4
container_name: nginx-proxy-acme #これを追加
volumes:
- certs:/etc/nginx/certs:rw
- acme:/etc/acme.sh
- ${DOCKER_HOST_ROOTLESS_PATH:-/var/run/docker.sock}:/var/run/docker.sock:ro
environment:
DEFAULT_EMAIL: ${LETSENCRYPT_EMAIL}
NGINX_PROXY_CONTAINER: nginx-proxy #これを追加
volumes:
certs:
html:
acme:
networks:
default:
name: sample-network
acme-companionでもnginxをマウントしないといけないっぽい
ubuntu
nginx-proxy-acme | Info: running acme-companion version v2.4.0
nginx-proxy-acme | Warning: '/usr/share/nginx/html' does not appear to be a mounted volume.
nginx-proxy-acme | Error: can't access to '/usr/share/nginx/html' directory !
nginx-proxy-acme | Check that '/usr/share/nginx/html' directory is declared as a writable volume.
composer.yaml
services:
nginx-proxy:
image: nginxproxy/nginx-proxy:1.6
container_name: nginx-proxy
ports:
- 80:80
- 443:443
volumes:
- certs:/etc/nginx/certs:ro
- html:/usr/share/nginx/html
- ${DOCKER_HOST_ROOTLESS_PATH:-/var/run/docker.sock}:/tmp/docker.sock:ro
nginx-proxy-acme:
image: nginxproxy/acme-companion:2.4
container_name: nginx-proxy-acme
volumes:
- certs:/etc/nginx/certs:rw
- html:/usr/share/nginx/html # これを追加
- acme:/etc/acme.sh
- ${DOCKER_HOST_ROOTLESS_PATH:-/var/run/docker.sock}:/var/run/docker.sock:ro
environment:
DEFAULT_EMAIL: ${LETSENCRYPT_EMAIL}
NGINX_PROXY_CONTAINER: nginx-proxy
volumes:
certs:
html:
acme:
networks:
default:
name: sample-network
このスクラップは5ヶ月前にクローズされました