2020-05-06 12:57:32 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-05-10 22:33:03 +01:00
|
|
|
printf "Domain root: "
|
|
|
|
read -r domain_root
|
|
|
|
printf "Subdomain (can be empty): "
|
|
|
|
read -r sub_domain
|
|
|
|
printf "Email: "
|
|
|
|
read -r email
|
|
|
|
printf "Use certificate signed by Let's Encrypt (Y/n): "
|
|
|
|
read -r signed
|
2020-05-06 12:57:32 +01:00
|
|
|
|
2020-05-10 22:33:03 +01:00
|
|
|
[ "${signed}" = "${signed#[Yy]}" ]
|
|
|
|
signed=$?
|
|
|
|
|
|
|
|
if [ -z "$sub_domain" ]
|
|
|
|
then
|
|
|
|
domain="${domain_root}"
|
2020-05-06 12:57:32 +01:00
|
|
|
else
|
2020-05-10 22:33:03 +01:00
|
|
|
domain="${sub_domain}.${domain_root}"
|
2020-05-06 12:57:32 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p ./docker/bootstrap
|
|
|
|
|
|
|
|
cat > ./docker/bootstrap/bootstrap.env <<EOF
|
2020-05-10 22:33:03 +01:00
|
|
|
#!/bin/sh
|
2020-05-06 12:57:32 +01:00
|
|
|
email=${email}
|
|
|
|
domain=${domain}
|
|
|
|
domain_root=${domain_root}
|
2020-05-10 22:33:03 +01:00
|
|
|
signed=${signed}
|
2020-05-06 12:57:32 +01:00
|
|
|
EOF
|
|
|
|
|
2020-05-10 22:33:03 +01:00
|
|
|
chmod +x ./docker/bootstrap/bootstrap.env
|
|
|
|
|
2020-05-06 12:57:32 +01:00
|
|
|
docker-compose -f docker/bootstrap/bootstrap.yaml up
|