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
|
2020-05-16 13:37:06 +01:00
|
|
|
printf "Use certificate signed by Let's Encrypt (Y/n): "
|
2020-07-05 23:28:40 +01:00
|
|
|
read -r signed
|
2020-05-06 12:57:32 +01:00
|
|
|
|
2020-05-10 22:33:03 +01:00
|
|
|
[ "${signed}" = "${signed#[Yy]}" ]
|
|
|
|
signed=$?
|
|
|
|
|
2020-07-05 23:28:40 +01:00
|
|
|
if [ $signed -ne 0 ]; then
|
2020-05-16 13:37:06 +01:00
|
|
|
printf "Email: "
|
|
|
|
read -r email
|
|
|
|
fi
|
|
|
|
|
2020-05-10 22:33:03 +01:00
|
|
|
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
|