# Render Blueprint — https://render.com/docs/blueprint-spec
# Connect your repo in the Render Dashboard and select "Apply Blueprint"
# or create a Web Service manually using these settings.

services:
  - type: web
    name: exam-platform
    runtime: python
    plan: starter  # Persistent disk requires a paid plan; use "free" for trials (ephemeral data)
    buildCommand: pip install -r requirements.txt
    startCommand: gunicorn --config gunicorn.conf.py app:app
    healthCheckPath: /healthz
    disk:
      name: exam-data
      mountPath: /opt/render/project/src/data
      sizeGB: 1
    envVars:
      - key: PYTHON_VERSION
        value: "3.12.0"
      - key: SECRET_KEY
        generateValue: true
      - key: DATA_DIR
        value: /opt/render/project/src/data
      - key: SESSION_COOKIE_SECURE
        value: "1"
      - key: WEB_CONCURRENCY
        value: "1"
      - key: APP_TIMEZONE
        value: Asia/Tehran
      - key: ADMIN_USERNAME
        sync: false
      - key: ADMIN_PASSWORD
        sync: false
      - key: SCHOOL_NAME
        sync: false
      - key: SCHOOL_TAGLINE
        sync: false
