Compare commits
11 Commits
ad4bb094c2
...
62a1c61f54
Author | SHA1 | Date |
---|---|---|
|
62a1c61f54 | |
|
cf44b237ab | |
|
29b1a9af84 | |
|
dafa16d433 | |
|
9fdb9461e7 | |
|
cb13104649 | |
|
59b0b8d34c | |
|
a3e0d81a90 | |
|
93e053d3bf | |
|
6ceb07489a | |
|
831b8abd7e |
|
@ -5,7 +5,7 @@ if ! [ -x "$(command -v docker-compose)" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
domains=(example.com www.example.com)
|
||||
domains=(example.org www.example.org)
|
||||
rsa_key_size=4096
|
||||
data_path="./data/certbot"
|
||||
email="" # Adding a valid address is strongly recommended
|
||||
|
@ -22,8 +22,8 @@ fi
|
|||
if [ ! -e "$data_path/conf/options-ssl-nginx.conf" ] || [ ! -e "$data_path/conf/ssl-dhparams.pem" ]; then
|
||||
echo "### Downloading recommended TLS parameters ..."
|
||||
mkdir -p "$data_path/conf"
|
||||
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot-nginx/certbot_nginx/options-ssl-nginx.conf > "$data_path/conf/options-ssl-nginx.conf"
|
||||
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot/ssl-dhparams.pem > "$data_path/conf/ssl-dhparams.pem"
|
||||
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot-nginx/certbot_nginx/_internal/tls_configs/options-ssl-nginx.conf > "$data_path/conf/options-ssl-nginx.conf"
|
||||
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot/certbot/ssl-dhparams.pem > "$data_path/conf/ssl-dhparams.pem"
|
||||
echo
|
||||
fi
|
||||
|
||||
|
@ -31,7 +31,7 @@ echo "### Creating dummy certificate for $domains ..."
|
|||
path="/etc/letsencrypt/live/$domains"
|
||||
mkdir -p "$data_path/conf/live/$domains"
|
||||
docker-compose run --rm --entrypoint "\
|
||||
openssl req -x509 -nodes -newkey rsa:1024 -days 1\
|
||||
openssl req -x509 -nodes -newkey rsa:$rsa_key_size -days 1\
|
||||
-keyout '$path/privkey.pem' \
|
||||
-out '$path/fullchain.pem' \
|
||||
-subj '/CN=localhost'" certbot
|
||||
|
|
Loading…
Reference in New Issue