| services: | |
| # Web service running the Flask dashboard | |
| - type: web | |
| name: uraas-dashboard | |
| env: python | |
| region: oregon | |
| plan: free | |
| # Build: install deps, download spaCy model, init DB, run any pending migrations | |
| buildCommand: > | |
| pip install --upgrade pip && | |
| pip install -r requirements.txt && | |
| python -m spacy download en_core_web_sm && | |
| playwright install --with-deps chromium && | |
| python scripts/init_db.py && | |
| python scripts/migrate_2026_upgrade.py && | |
| mkdir -p storage/pdfs | |
| # Uses gunicorn_config.py (gthread workers, matching SocketIO async_mode=threading) | |
| startCommand: "gunicorn --config gunicorn_config.py uraas.dashboard.app:app" | |
| healthCheckPath: /health | |
| envVars: | |
| - key: PYTHON_VERSION | |
| value: "3.11" | |
| # ββ Database ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| - key: DATABASE_URL | |
| fromDatabase: | |
| name: uraas-db | |
| property: connectionString | |
| # ββ Secrets (set manually in Render Dashboard β Environment) βββββββββ | |
| # Generate DASHBOARD_SECRET_KEY: | |
| # python -c "import secrets; print(secrets.token_hex(32))" | |
| - key: DASHBOARD_SECRET_KEY | |
| generateValue: true | |
| # Generate ADMIN_PASSWORD_HASH: | |
| # python -c "from werkzeug.security import generate_password_hash as g; print(g('YOUR_STRONG_PASSWORD'))" | |
| - key: ADMIN_PASSWORD_HASH | |
| sync: false | |
| - key: ADMIN_USERNAME | |
| value: "admin" | |
| # Generate VIEWER_PASSWORD_HASH the same way. Leave empty to disable viewer login. | |
| - key: VIEWER_PASSWORD_HASH | |
| sync: false | |
| - key: VIEWER_USERNAME | |
| value: "viewer" | |
| # ββ Production flags ββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| - key: URAAS_ENV | |
| value: "production" | |
| - key: RENDER | |
| value: "true" | |
| # ββ Storage βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| - key: STORAGE_PATH | |
| value: "/opt/render/project/storage" | |
| # ββ CORS (set to your actual UNILAG HTTPS domain) βββββββββββββββββββββ | |
| # Example: https://repository.unilag.edu.ng | |
| - key: DASHBOARD_CORS_ORIGINS | |
| sync: false | |
| # ββ AI / external APIs ββββββββββββββββββββββββββββββββββββββββββββββββ | |
| - key: HF_HOME | |
| value: "/opt/render/project/storage/hf-cache" | |
| - key: OPENALEX_API_KEY | |
| sync: false | |
| # ββ ARK persistent identifiers ββββββββββββββββββββββββββββββββββββββββ | |
| - key: ARK_NAAN | |
| value: "99999" | |
| disk: | |
| name: uraas-storage | |
| mountPath: /opt/render/project/storage | |
| sizeGB: 10 | |
| databases: | |
| # PostgreSQL database for storing research data | |
| - name: uraas-db | |
| databaseName: uraas_production | |
| user: uraas_user | |
| plan: free | |