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
2023-01-31 15:57:15 +01:00
export BILLING_SERVICE_URL=${BILLING_SERVICE_URL:-https://billing.dev.posthog.dev}
2024-07-16 19:12:48 +02:00
export HOG_HOOK_URL=${HOG_HOOK_URL:-http://localhost:3300/hoghook}
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
2024-04-22 22:52:47 +02:00
[ ! -f ./share/GeoLite2-City.mmdb ] && ( curl -L "https://mmdbcdn.posthog.net/" --http1.1 | brotli --decompress --output=./share/GeoLite2-City.mmdb )
2022-07-26 02:20:11 +02:00
2020-04-07 12:34:01 +02:00
./bin/start-worker &
./bin/start-backend &
./bin/start-frontend &
2023-03-20 23:56:14 +01:00
./bin/temporal-django-worker &
2020-04-07 12:34:01 +02:00
wait