ZKP-License-System/merkle-service/docker-entrypoint.sh

23 lines
No EOL
473 B
Bash

#!/bin/sh
set -e
echo "Starting Merkle Service..."
# Wait for PostgreSQL
echo "Waiting for PostgreSQL..."
until pg_isready -h postgres -U license_admin -d license_verification; do
echo "PostgreSQL is unavailable - sleeping"
sleep 2
done
echo "PostgreSQL is ready!"
# Check Redis (optional)
echo "Checking Redis..."
if nc -z redis 6379; then
echo "Redis is ready!"
else
echo "Redis not available, continuing without cache"
fi
# Execute the main command
exec "$@"