Files
docupulse/entrypoint.sh
2025-05-26 15:45:23 +02:00

23 lines
477 B
Bash

#!/bin/bash
# Wait for the database to be ready
echo "Waiting for database to be ready..."
while ! nc -z db 5432; do
sleep 0.1
done
echo "Database is ready!"
# Initialize the database
flask db upgrade
# Create default site settings if they don't exist
python3 -c "
from app import create_app
from models import SiteSettings, db
app = create_app()
with app.app_context():
SiteSettings.get_settings()
"
# Start the application
exec gunicorn --bind 0.0.0.0:5000 app:app