Update self hosting scripts (#367)

split setup.env with example and base

add setup.env to .gitignore to avoid overwrite from new versions

Added test workflow for docker-compose 
and validated configure.sh generated variables
This commit is contained in:
Maycon Santos
2022-06-24 14:50:14 +02:00
committed by GitHub
parent 06860c4c10
commit 1aafc15607
21 changed files with 120 additions and 275 deletions

View File

@@ -1,10 +1,32 @@
#!/bin/bash
source setup.env
source base.setup.env
if ! which envsubst > /dev/null 2>&1
then
echo "envsubst is needed to run this script"
if [[ $(uname) == "Darwin" ]]
then
echo "you can install it with homebrew (https://brew.sh):"
echo "brew install gettext"
else
if which apt-get > /dev/null 2>&1
then
echo "you can install it by running"
echo "apt-get update && apt-get install gettext-base"
else
echo "you can install it by installing the package gettext with your package manager"
fi
fi
exit 1
fi
if [[ "x-$NETBIRD_DOMAIN" == "x-" ]]
then
echo NETBIRD_DOMAIN is not set, please update your setup.env file
echo If you are migrating from old versions, you migh need to update your variables prefixes from
echo WIRETRUSTEE_.. TO NETBIRD_
exit 1
fi