services:
  - type: web
    name: alltrue-backend-staging
    env: php
    plan: free
    rootDir: backend
    buildCommand: "composer install --no-dev --optimize-autoloader"
    startCommand: "php -S 0.0.0.0:$PORT -t public"
    envVars:
      - key: APP_ENV
        value: production
      - key: APP_DEBUG
        value: "false"
      - key: APP_KEY
        value: "base64:REPLACE_ME"
      - key: APP_URL
        value: "https://REPLACE_ME.onrender.com"
      - key: LOG_CHANNEL
        value: stack
      - key: DB_CONNECTION
        value: pgsql
      - key: DB_HOST
        value: "db.REPLACE_ME.supabase.co"
      - key: DB_PORT
        value: "5432"
      - key: DB_DATABASE
        value: postgres
      - key: DB_USERNAME
        value: postgres
      - key: DB_PASSWORD
        value: "REPLACE_ME"
      - key: DB_SSLMODE
        value: require
      - key: SANCTUM_STATEFUL_DOMAINS
        value: "localhost,127.0.0.1"
      - key: SESSION_DRIVER
        value: cookie
