2021-12-27 14:41:54 +01:00
|
|
|
#!/bin/bash
|
|
|
|
### Note: Currently not complete, needs some features before useable for production
|
|
|
|
|
2022-04-11 15:28:11 +02:00
|
|
|
if [ $# -eq 0 ]; then
|
2022-05-03 09:16:19 +02:00
|
|
|
echo "Please provide a Project as argument"
|
2022-04-11 15:28:11 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-05-03 09:16:19 +02:00
|
|
|
if [ $1 != "ccp" ] && [ $1 != "nngm" ] && [ $1 != "gbn" ]; then
|
|
|
|
echo "Please provide a supported project like ccp, gbn or nngm"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
export project=$1
|
|
|
|
|
2022-01-10 16:31:48 +01:00
|
|
|
source lib/functions.sh
|
|
|
|
|
2022-01-11 13:49:36 +01:00
|
|
|
if ! lib/prerequisites.sh; then
|
2022-05-03 09:16:19 +02:00
|
|
|
log "Validating Prerequisites failed, please fix the occurring error"
|
|
|
|
exit 1
|
2022-01-04 15:26:34 +01:00
|
|
|
fi
|
2021-12-27 14:41:54 +01:00
|
|
|
|
2022-02-16 09:42:53 +01:00
|
|
|
./lib/generate.sh
|
|
|
|
|
2022-01-10 16:31:48 +01:00
|
|
|
log "Starting bridgehead"
|
2021-12-27 14:41:54 +01:00
|
|
|
|
2022-05-03 09:16:19 +02:00
|
|
|
docker-compose -f $1/docker-compose.yml --env-file /etc/bridgehead-config/$1.env up -d
|
2021-12-27 14:41:54 +01:00
|
|
|
|
2022-01-10 16:31:48 +01:00
|
|
|
log "The bridgehead should be in online in a few seconds"
|