services:
  - type: web
    name: arise-laravel-app
    runtime: docker
    buildCommand: docker build -t arise-app .
    startCommand: docker run -p $PORT:80 arise-app
    envVars:
      - key: APP_NAME
        value: Arise
      - key: APP_ENV
        value: production
      - key: APP_KEY
        value: base64:$(openssl rand -base64 32)
      - key: APP_DEBUG
        value: false
      - key: APP_URL
        sync: true
      - key: DB_CONNECTION
        value: mysql
      - key: DB_HOST
        fromService:
          type: pserv
          name: arise-db
          property: host
      - key: DB_PORT
        fromService:
          type: pserv
          name: arise-db
          property: port
      - key: DB_DATABASE
        fromService:
          type: pserv
          name: arise-db
          property: database
      - key: DB_USERNAME
        fromService:
          type: pserv
          name: arise-db
          property: user
      - key: DB_PASSWORD
        fromService:
          type: pserv
          name: arise-db
          property: password
      - key: LOG_CHANNEL
        value: stack
      - key: LOG_DEPRECATIONS_CHANNEL
        value: "null"
      - key: LOG_LEVEL
        value: error

databases:
  - name: arise-db
    databaseName: arise_db
    user: arise_user
    plan: starter
