services:
# Web Service (Laravel) - Using External Prisma.io Database
- type: web
  name: stream-xtube
  env: docker
  region: singapore
  plan: starter # $7/month
  dockerfilePath: ./Dockerfile.render
  envVars:
  - key: APP_NAME
    value: XTube
  - key: APP_ENV
    value: production
  - key: APP_KEY
    generateValue: true
  - key: APP_DEBUG
    value: false
  - key: APP_URL
    value: https://stream-xtube.onrender.com
  - key: LOG_CHANNEL
    value: stderr
  - key: LOG_LEVEL
    value: error
  # Use existing Prisma.io database
  - key: DB_CONNECTION
    value: pgsql
  - key: DB_HOST
    value: db.prisma.io
  - key: DB_PORT
    value: 5432
  - key: DB_DATABASE
    value: postgres
  - key: DB_USERNAME
    value: f2371dc5983395c54215451b45f0b9b09117cc2abfd6367376831729c17f99af
  - key: DB_PASSWORD
    value: sk_t7bcapvo544KXIlBAQRCI
  - key: DB_SSLMODE
    value: require
  - key: CACHE_STORE
    value: redis
  - key: SESSION_DRIVER
    value: redis
  - key: QUEUE_CONNECTION
    value: redis
  - key: REDIS_HOST
    fromService:
      type: redis
      name: stream-xtube-redis
      property: host
  - key: REDIS_PORT
    fromService:
      type: redis
      name: stream-xtube-redis
      property: port
  disk:
    name: storage
    mountPath: /app/storage
    sizeGB: 10

# Redis Service (Free)
- type: redis
  name: stream-xtube-redis
  plan: free
  maxmemoryPolicy: allkeys-lru
  ipAllowList: []
