tts / docker-entrypoint.sh
xdxb's picture
Update docker-entrypoint.sh
185c8ab verified
raw
history blame contribute delete
837 Bytes
#!/bin/bash
set -e
# Start Redis server in the background with RDB snapshots disabled
echo "Starting Redis server with RDB snapshots disabled..."
redis-server --save "" --daemonize yes
# Wait for Redis to be ready
until redis-cli ping; do
echo "Waiting for Redis to be ready..."
sleep 1
done
echo "Redis is ready."
# Start Celery worker in the background
echo "Starting Celery worker..."
celery -A celery_worker.celery worker --pool=solo -l info &
# Wait for Celery to initialize (optional, can be adjusted or removed if not strictly necessary)
echo "Waiting for Celery to initialize..."
sleep 2 # Adjusted sleep time, consider if still needed
echo "Celery worker started."
# Start Flask application with Waitress
echo "Starting Flask application with Waitress on $HOST:$PORT..."
waitress-serve --host=$HOST --port=$PORT app:app