Files
ssl-nginx/certbot_manual.sh
kanootoko 16bc1c0db7 update 2024-04-22
Changes:
- add jinja2 template engine instead of string-replacing
- fix certbot cron usage
- replace json servers configuration with yaml
2024-04-22 21:53:47 +03:00

15 lines
606 B
Bash
Executable File

#!/bin/sh
SSL_VOLUME_NAME=ssl_nginx_ssl
LETSENCRYPT_VOLUME_NAME=ssl_nginx_letsencrypt
if [ "$EMAIL" = '' ]; then
echo "Set EMAIL environment variable to run this!"
exit 1
fi
docker build --tag certbot_manual_test --build-arg EMAIL="$EMAIL" certbot
echo "execute 'cat /run_once' to get commands list"
echo "for wildcard domains use manual mode with dns challange: 'certbot certonly -d '*.domain' --manual --preferred-challenges dns"
docker run -it --rm -v $SSL_VOLUME_NAME:/ssl -v $LETSENCRYPT_VOLUME_NAME:/etc/letsencrypt --entrypoint /bin/bash certbot_manual_test
docker rmi certbot_manual_test