2020-04-07 12:34:01 +02:00
#!/bin/bash
2022-01-13 18:09:49 +01:00
2020-04-07 12:34:01 +02:00
set -e
2020-04-08 15:38:28 +02:00
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
2022-01-13 18:09:49 +01:00
export DEBUG=${DEBUG:-1}
2022-01-18 15:05:22 +01:00
export SKIP_SERVICE_VERSION_REQUIREMENTS=1
2022-01-13 18:09:49 +01:00
service_warning() {
2022-07-14 12:12:56 +02:00
echo -e "\033[0;31m$1 isn't ready. You can run the stack with:\ndocker compose -f docker-compose.dev.yml up\nIf you have already ran that, just make sure that services are starting properly, and sit back.\nWaiting for $1 to start...\033[0m"
2022-01-13 18:09:49 +01:00
}
nc -z localhost 9092 || ( service_warning 'Kafka'; bin/check_kafka_clickhouse_up )
curl -s 'http://localhost:8123/ping' || ( service_warning 'ClickHouse'; bin/check_kafka_clickhouse_up )
2021-04-06 15:50:48 +02:00
2022-07-26 02:20:11 +02:00
[ ! -f ./share/GeoLite2-City.mmdb ] && ( curl -L "https://mmdbcdn.posthog.net/" | brotli --decompress --output=./share/GeoLite2-City.mmdb )
2020-04-07 12:34:01 +02:00
./bin/start-worker &
./bin/start-backend &
./bin/start-frontend &
wait