bootstrap_certificates 624 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. printf "Domain root: "
  3. read -r domain_root
  4. printf "Subdomain (can be empty): "
  5. read -r sub_domain
  6. printf "Email: "
  7. read -r email
  8. printf "Use certificate signed by Let's Encrypt (Y/n): "
  9. read -r signed
  10. [ "${signed}" = "${signed#[Yy]}" ]
  11. signed=$?
  12. if [ -z "$sub_domain" ]
  13. then
  14. domain="${domain_root}"
  15. else
  16. domain="${sub_domain}.${domain_root}"
  17. fi
  18. mkdir -p ./docker/bootstrap
  19. cat > ./docker/bootstrap/bootstrap.env <<EOF
  20. #!/bin/sh
  21. email=${email}
  22. domain=${domain}
  23. domain_root=${domain_root}
  24. signed=${signed}
  25. EOF
  26. chmod +x ./docker/bootstrap/bootstrap.env
  27. docker-compose -f docker/bootstrap/bootstrap.yaml up