###### NOT CURRENTLY USED - API not working in the free version!
exit 0
echo '******************************************************'
echo 'Cloning eramba repo'
echo '******************************************************'

mkdir ~/eramba
git clone https://github.com/eramba/docker ~/eramba
cd ~/eramba

echo '******************************************************'
echo 'Creating config files'
echo '******************************************************'

cat << EOF >~/eramba/.env
DB_HOST=mysql
DB_DATABASE=eramba
DB_USERNAME=eramba
DB_PASSWORD=EpicLilacKing200
CACHE_URL=Redis://?server=redis&port=6379&password=&timeout=3
MYSQL_ROOT_PASSWORD=mysqlrootpwd
USE_PROXY=0
PROXY_HOST=
PROXY_PORT=
USE_PROXY_AUTH=0
PROXY_AUTH_USER=
PROXY_AUTH_PASS=
PUBLIC_ADDRESS=https://172.18.1.172:4443
DOCKER_DEPLOYMENT=1
LDAPTLS_REQCERT=never
EOF

#Fix the port, since 8443 is used by Fleet DM
sed -i 's/8443/4443/' ~/eramba/docker-compose.simple-install.yml

#Remove the deprecated 'version' line
sed -i '/^version.*$/d' ~/eramba/docker-compose.simple-install.yml

echo '******************************************************'
echo 'Running docker compose'
echo '******************************************************'

sudo docker compose -f docker-compose.simple-install.yml up -d

#erambaAdmin@lab.internal
#ErambaSuperAdminPassword9!

#student@lab.internal
#Student1234!
