Closed ldrrp closed 2 years ago
Currently the old domain add script lives in bash:
# Check if nginx is running DOCKER_STOPPED=false if [ "$(docker ps -q -f name=nginx)" ]; then if [ "$(docker ps -aq -f status=running -f name=nginx)" ]; then #need to stop temp docker container stop nginx DOCKER_STOPPED=true fi fi if [ -z "$1" ] then echo "Please supply the domain name: 'add-domain.sh domain.com'" exit 1 fi docker run --rm -i \ -v "/docker-nas/docker-data/letsencrypt:/etc/letsencrypt" \ -v "/docker-nas/docker-data/certbot:/var/www/certbot" \ -p 80:80 \ -p 443:443 \ certbot/certbot 'certonly' '--standalone' \ "-d $1" '--agree-tos' "-m $GLOBAL_EMAIL" if [ $DOCKER_STOPPED = true ]; then docker container start nginx fi
Allow the user to run command to add a domain name certificate. We want to eliminate calling scripts entirely.
We need to carry this into golang at the following location:
https://github.com/SiloCityLabs/docker-nas/blob/v3/server/models/domain.go#L49
Problem
Currently the old domain add script lives in bash:
Solution
Allow the user to run command to add a domain name certificate. We want to eliminate calling scripts entirely.
We need to carry this into golang at the following location:
https://github.com/SiloCityLabs/docker-nas/blob/v3/server/models/domain.go#L49
Steps to Reproduce the Problem