#### Render Blueprint specification: https://dashboard.render.com/blueprints ####
## 👇 Preview environments: https://render.com/docs/preview-environments ###
# previewsEnabled: true
## 👇 Automatically nuke the environment after X days of inactivity to reduce billing:
# previewsExpireAfterDays: 2
services:
  - type: web
    name: workplacify-app
    env: node
    plan: starter
    ## 👇 Specify the plan for the PR deployment:
    # previewPlan: starter
    ## 👇 Preview Environment Initialization script:
    # initialDeployHook: npm run db-seed
    buildCommand: npm install --include=dev && npm run build --include=dev
    startCommand: npm run start
    healthCheckPath: /api/trpc/healthcheck
    envVars:
      - key: DATABASE_URL
        fromDatabase:
          name: workplacify-db
          property: connectionString

databases:
  - name: workplacify-db
    plan: starter
