This commit is contained in:
2022-05-01 20:50:31 +03:00
parent 2ba9d3164d
commit 66ed466f7e
4 changed files with 20 additions and 0 deletions

3
add-cron-for-certs.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
crontab -l | { cat; echo "0 0 * * 0 expr `date +\%W` \% 2 > /dev/null || /nordcod-nginx/cron-certs.sh"; } | crontab -

10
create-certs.sh Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
mv config/nginx.conf config/nginx.conf.bk
mv config/nginx.conf.initial config/nginx.conf
docker-compose up --build nginx -d # start nginx for acme challenge
docker-compose -f docker-compose-le.yaml up --build # create certs
docker stop nordcod-nginx # now use nginx with full config
mv config/nginx.conf config/nginx.conf.initial
mv config/nginx.conf.bk config/nginx.conf

4
cron-certs.sh Normal file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
docker-compose -f /nordcod-nginx/docker-compose-le.yaml up
docker exec -it nordcod-nginx nginx -s reload

3
start.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
docker-compose up --build nginx