commands
This commit is contained in:
3
add-cron-for-certs.sh
Normal file
3
add-cron-for-certs.sh
Normal 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
10
create-certs.sh
Normal 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
4
cron-certs.sh
Normal 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
|
||||
Reference in New Issue
Block a user