fix entrypoint.sh
This commit is contained in:
parent
c524e2e6b9
commit
7498cabd98
19
README.md
19
README.md
|
|
@ -22,6 +22,8 @@ nginx-certbot
|
|||
|
||||
## docker compose
|
||||
```yml
|
||||
version: "3.5"
|
||||
|
||||
services:
|
||||
nginx:
|
||||
build: .
|
||||
|
|
@ -48,4 +50,21 @@ docker exec -it nginx bash
|
|||
|
||||
# reload nginx
|
||||
nginx -s reload
|
||||
```
|
||||
|
||||
## acme-challenge.conf
|
||||
|
||||
`acme-challenge.conf` 을 conf.d 에 포함
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name your.domain;
|
||||
|
||||
location ~ /.well-known/acme-challenge {
|
||||
allow all;
|
||||
root /var/www/html;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
server {
|
||||
listen 8080;
|
||||
listen [::]:8080;
|
||||
server_name ydev.me;
|
||||
|
||||
location ~ /.well-known/acme-challenge {
|
||||
allow all;
|
||||
root /var/www/html;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# copy acme-chanllenge
|
||||
echo "copy acme-challenge"
|
||||
cp /home/acme-challenge.conf /etc/nginx/conf.d/acme-challenge.conf
|
||||
|
||||
# add crontab entry to renew the letsencrypt certificate
|
||||
echo "adding crontab"
|
||||
echo "0 23 * * * certbot renew --dry-run" | crontab -
|
||||
|
|
|
|||
Loading…
Reference in New Issue