我使用 letsencrypt-nginx-proxy-companion 为我的网站生成ssl证书,该证书一直有效,但是自15天以来,我无法再创建新的ssl证书。 所做的唯一更改是将映像从v1.11更新到v.13。 非常感谢您的帮助!
docker-compose.yml:
version: '3'
services:
nginx-proxy:
image: nginx
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
container_name: nginx-proxy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./conf.d:/etc/nginx/conf.d
- ./vhost.d:/etc/nginx/vhost.d
- ./html:/usr/share/nginx/html
- ./certs:/etc/nginx/certs:ro
nginx-gen:
image: jwilder/docker-gen
command: -notify-sighup nginx-proxy -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
container_name: nginx-gen
restart: unless-stopped
volumes:
- ./conf.d:/etc/nginx/conf.d
- ./vhost.d:/etc/nginx/vhost.d
- ./html:/usr/share/nginx/html
- ./certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
nginx-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: nginx-letsencrypt
restart: unless-stopped
volumes:
- ./conf.d:/etc/nginx/conf.d
- ./vhost.d:/etc/nginx/vhost.d
- ./html:/usr/share/nginx/html
- ./certs:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./app/docker-gen.cfg:/app/letsencrypt_user_data:ro
environment:
NGINX_DOCKER_GEN_CONTAINER: "nginx-gen"
NGINX_PROXY_CONTAINER: "nginx-proxy"
networks:
default:
external:
name: wordpress
learning:
external: true
码头工人图像:
jrcs/letsencrypt-nginx-proxy-companion latest xxxxxxxx 32 hours ago
docker-compose日志nginx-letsencrypt:
nginx-letsencrypt | Reloading nginx docker-gen (using separate container nginx-gen)...
nginx-letsencrypt | Reloading nginx (using separate container ec5f65a8ecc84fc03c31032c88db2c8c9cf814c983bed9d3b074a6311230459c)...
nginx-letsencrypt | 2020/06/11 22:46:45 Generated '/app/letsencrypt_service_data' from 24 containers
nginx-letsencrypt | 2020/06/11 22:46:45 Running '/app/signal_le_service'
nginx-letsencrypt | 2020/06/11 22:46:45 Watching docker events
nginx-letsencrypt | 2020/06/11 22:46:45 Contents of /app/letsencrypt_service_data did not change. Skipping notification '/app/signal_le_service'
nginx-letsencrypt | /app/letsencrypt_user_data: line 1: [[config]]: command not found
nginx-letsencrypt | /app/letsencrypt_user_data: line 2: template: command not found
nginx-letsencrypt | /app/letsencrypt_user_data: line 3: dest: command not found
nginx-letsencrypt | /app/letsencrypt_user_data: line 4: onlyexposed: command not found
nginx-letsencrypt | /app/letsencrypt_user_data: line 5: notifycmd: command not found
nginx-letsencrypt | /app/letsencrypt_user_data: line 7: [[config]]: command not found
nginx-letsencrypt | /app/letsencrypt_user_data: line 8: template: command not found
nginx-letsencrypt | /app/letsencrypt_user_data: line 9: dest: command not found
nginx-letsencrypt |
Every 2.0s: = true 2020-06-11 22:46:46
nginx-letsencrypt |
nginx-letsencrypt | sh: =: not found
答案 0 :(得分:0)
删除此行即可使用(docker-compose.yml): -./app/docker-gen.cfg:/app/letsencrypt_user_data:ro