services:
  - type: web
    name: parcelvoy
    env: docker
    repo: https://github.com/parcelvoy/platform.git
    dockerfilePath: ./docker/Dockerfile.render
    dockerContext: .
    autoDeploy: false
    healthCheckPath: /api/health
    envVars:
      - key: NODE_ENV
        value: production
      - key: BASE_URL
        sync: false
      - key: MONO
        value: true
      - key: APP_SECRET
        generateValue: true
      - key: DB_CLIENT
        value: mysql2
      - key: DB_HOST
        fromService:
          type: pserv
          name: mysql
          property: host
      - key: DB_USERNAME
        fromService:
          type: pserv
          name: mysql
          envVarKey: MYSQL_USER
      - key: DB_PASSWORD
        fromService:
          type: pserv
          name: mysql
          envVarKey: MYSQL_PASSWORD
      - key: DB_PORT
        fromService:
          type: pserv
          name: mysql
          property: port
      - key: DB_DATABASE
        fromService:
          type: pserv
          name: mysql
          envVarKey: MYSQL_DATABASE
      - key: STORAGE_DRIVER
        value: local
      - key: QUEUE_DRIVER
        value: redis
      - key: REDIS_HOST
        fromService:
          type: redis
          name: lightning
          property: host
      - key: REDIS_PORT
        fromService:
          type: redis
          name: lightning
          property: port
      - key: AUTH_DRIVER
        value: basic
      - key: AUTH_BASIC_EMAIL
        sync: false
      - key: AUTH_BASIC_PASSWORD
        sync: false
  - type: redis
    name: lightning
    ipAllowList: []
    maxmemoryPolicy: noeviction # optional (defaults to allkeys-lru)
  - type: pserv
    name: mysql
    plan: standard
    env: docker
    repo: https://github.com/render-examples/mysql
    autoDeploy: false
    disk:
      name: mysql
      mountPath: /var/lib/mysql
      sizeGB: 10
    envVars:
    - key: MYSQL_ROOT_PASSWORD
      generateValue: true
    - key: MYSQL_DATABASE
      value: parcelvoy
    - key: MYSQL_USER
      value: parcelvoy
    - key: MYSQL_PASSWORD
      generateValue: true
