core/apps/init/entrypoint.sh
Harshith Mullapudi 2a6acaf899
Feat: webhooks for oauth apps (#32)
* Fix: integration account webhooks

* Fix: activity webhook

* Feat: add integration credentials API

* Fix: user rules for integrations

* Feat: make self hosting simple

* Fix: add init container functionality

---------

Co-authored-by: Manoj K <saimanoj58@gmail.com>
2025-08-01 10:34:16 +05:30

22 lines
456 B
Bash

#!/bin/sh
# Exit on any error
set -e
echo "Starting init CLI..."
# Wait for database to be ready
echo "Waiting for database connection..."
until pg_isready -h "${DB_HOST:-localhost}" -p "${DB_PORT:-5432}" -U "${POSTGRES_USER:-docker}"; do
echo "Database is unavailable - sleeping"
sleep 2
done
echo "Database is ready!"
# Run the init command
echo "Running init command..."
node ./dist/esm/index.js init
echo "Init completed successfully!"
exit 0