mirror of
https://github.com/thecyberlearn/quantumtaskai-caprover.git
synced 2026-08-18 08:52:57 +00:00
- Updated Dockerfile.dokploy with proper startup script - Added start-dokploy.sh for database migrations and health checks - Enhanced dokploy.json with required environment variables - Added debug Dockerfile for troubleshooting (Dockerfile.dokploy.debug) - Added debug config (dokploy.debug.json) for testing - Fixed static file collection and gunicorn configuration - Improved error handling and logging for deployment issues
35 lines
897 B
Bash
Executable File
35 lines
897 B
Bash
Executable File
#!/bin/bash
|
|
# Dokploy startup script
|
|
|
|
set -e # Exit on any error
|
|
|
|
echo "🚀 Starting Quantum Tasks AI on Dokploy"
|
|
echo "======================================="
|
|
|
|
# Run database migrations
|
|
echo "📄 Running database migrations..."
|
|
python manage.py migrate --noinput
|
|
|
|
# Create cache table if needed
|
|
echo "🗄️ Ensuring cache table exists..."
|
|
python manage.py createcachetable || true
|
|
|
|
# Check if we can access the database
|
|
echo "🔍 Testing database connection..."
|
|
python manage.py check --database default
|
|
|
|
# Start the application
|
|
echo "🌐 Starting gunicorn server on port 3000..."
|
|
echo "Health check endpoint: /health/"
|
|
echo "======================================="
|
|
|
|
exec gunicorn netcop_hub.wsgi:application \
|
|
--bind 0.0.0.0:3000 \
|
|
--workers 2 \
|
|
--timeout 120 \
|
|
--max-requests 1000 \
|
|
--preload \
|
|
--log-level info \
|
|
--access-logfile - \
|
|
--error-logfile -
|