Deploy your Dynamic AML Detection System online using various cloud platforms. Choose the method that best fits your needs.
Ready-to-deploy files created:
- β
app_production.py- Production Flask app - β
Dockerfile- Docker containerization - β
requirements.txt- Python dependencies - β Platform-specific configs (Railway, Render, Heroku, etc.)
- β Dynamic dashboard with auto-API detection
Why Railway? Free tier, automatic HTTPS, simple deployment from GitHub.
-
Push to GitHub (if not already):
git init git add . git commit -m "Initial commit: Dynamic AML System" git branch -M main git remote add origin https://github.com/YOUR_USERNAME/aml-controller.git git push -u origin main
-
Deploy on Railway:
- Visit railway.app
- Click "Start a New Project"
- Connect your GitHub repo:
aml-controller - Railway auto-detects the Dockerfile and deploys
- Get your URL:
https://YOUR_APP.railway.app
-
Access your system:
- Dashboard:
https://YOUR_APP.railway.app/dashboard - API:
https://YOUR_APP.railway.app/api/health
- Dashboard:
Why Render? Reliable, free SSL, good for production apps.
-
Push to GitHub (same as above)
-
Deploy on Render:
- Visit render.com
- Create "New Web Service"
- Connect GitHub repo:
aml-controller - Use these settings:
- Runtime: Docker
- Build Command: (auto-detected)
- Start Command:
python app_production.py
- Deploy and get URL:
https://YOUR_APP.onrender.com
Why Heroku? Battle-tested platform, extensive documentation.
-
Install Heroku CLI:
brew install heroku/brew/heroku # Mac # or download from heroku.com
-
Deploy:
heroku login heroku create your-aml-app-name git push heroku main heroku open
-
Your URL:
https://your-aml-app-name.herokuapp.com
Why Cloud Run? Pay-per-use, highly scalable, Google infrastructure.
-
Install gcloud CLI:
# Follow instructions at cloud.google.com/sdk -
Deploy:
gcloud auth login gcloud config set project YOUR_PROJECT_ID gcloud run deploy aml-system --source . --region us-central1 --allow-unauthenticated
Why DigitalOcean? Simple pricing, good performance, developer-friendly.
- Push to GitHub
- Create App on DigitalOcean App Platform
- Connect GitHub repo and deploy
- URL:
https://YOUR_APP.ondigitalocean.app
Test the Docker container locally:
# Build image
docker build -t dynamic-aml .
# Run container
docker run -p 8080:5000 dynamic-aml
# Or use the configured port mapping:
docker-compose up
# Access at http://localhost:5001 (via docker-compose)Most platforms will auto-detect these settings from the config files:
| Platform | Config File | Port | Health Check |
|---|---|---|---|
| Railway | railway.toml |
Auto | /api/health |
| Render | render.yaml |
Auto | /api/health |
| Heroku | Procfile |
Auto | /api/health |
| Vercel | vercel.json |
Auto | /api/health |
| Google App Engine | app.yaml |
Auto | /api/health |
Once deployed, test your system:
- Health Check:
https://YOUR_URL/api/health - Dashboard:
https://YOUR_URL/dashboard - Generate Data: Click "π² Generate Test Data" in dashboard
- API Test:
curl https://YOUR_URL/api/statistics
- β CORS configured for production domains
- β Error handling with proper HTTP status codes
- β Request logging for monitoring
- β Health checks for uptime monitoring
- β Rate limiting on data generation endpoints
- β Secure headers and production settings
Most platforms support custom domains:
- Railway: Project Settings β Networking
- Render: Service Settings β Custom Domains
- Heroku: App Settings β Domains
Set these if needed:
DATABASE_PATH: Custom database locationFLASK_ENV:production(already set)PORT: Custom port (auto-detected)
Production limits are set in app_production.py:
- Max transactions per generation: 100
- Max batch processing: 50
- Alert history: 20 recent alerts
- Railway: Project β Deployments β View Logs
- Render: Service β Logs tab
- Heroku:
heroku logs --tail
- Railway/Render: Files persist across deployments
- Heroku: Use PostgreSQL add-on for persistence
- Cloud Run: Use Cloud SQL for production
- Railway: Automatic scaling included
- Render: Upgrade plan for auto-scaling
- Heroku:
heroku ps:scale web=2
-
"Application Error" on startup:
- Check logs for Python dependency issues
- Ensure
requirements.txtis complete
-
Database errors:
- Check write permissions for database directory
- Verify
DATABASE_PATHenvironment variable
-
API CORS errors:
- Verify your domain is in CORS origins list
- Check browser developer console for errors
-
Slow initial load:
- First request initializes the system (normal)
- Subsequent requests will be faster
- Railway: railway.app/help
- Render: render.com/docs
- Heroku: devcenter.heroku.com
Once deployed, your Dynamic AML System will be available online with:
- π Public URL accessible worldwide
- π HTTPS encryption automatically configured
- π Real-time dashboard with live data
- π Production-ready API with proper logging
- π‘οΈ AML detection engine processing transactions
- π₯ Live sanctions data integration
Next Steps:
- Share your URL:
https://YOUR_APP.PLATFORM.app/dashboard - Generate demo data using the dashboard controls
- Explore the API endpoints at
/api/health - Monitor system performance through platform dashboards
π― Recommended: Start with Railway for the easiest deployment experience, then consider other platforms based on your scaling needs.