0
我两个月前用的是docker版本的acme.sh,今天发现自动更新了证书,证书目录下除了key.pem日期没有变化之外,其他3个pem日期都更新了。但是在浏览器上查看证书还是旧的,直到我手动restart了nginx这个容器,浏览器上看到的证书才更新。所以貌似是ngxin没有重新加载新证书,镜像都是最新版本,不知道是什么原因。
nginx: container_name: nginx image: nginx:alpine labels:
-
nginx volumes:
- "/etc/localtime:/etc/localtime:ro"
- "./nginx/conf.d:/etc/nginx/conf.d"
- "./nginx/nginx.conf:/etc/nginx/nginx.conf"
- "./nginx/cert:/etc/nginx/cert"
- "./nginx/log:/var/log/nginx"
- "./wwwroot:/wwwroot" ports:
- "80:80"
- "443:443" restart: always
acme.sh: container_name: acme.sh image: neilpang/acme.sh volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
- "./acme.sh:/acme.sh" command: daemon environment:
- DEPLOY_DOCKER_CONTAINER_LABEL=nginx
- DEPLOY_DOCKER_CONTAINER_KEY_FILE=/etc/nginx/cert/example.com/key.pem
- DEPLOY_DOCKER_CONTAINER_CERT_FILE="/etc/nginx/cert/example.com/cert.pem"
- DEPLOY_DOCKER_CONTAINER_CA_FILE="/etc/nginx/cert/example.com/ca.pem"
- DEPLOY_DOCKER_CONTAINER_FULLCHAIN_FILE="/etc/nginx/cert/example.com/full.pem"
- DEPLOY_DOCKER_CONTAINER_RELOAD_CMD="service nginx force-reload" restart: always