services:
  - type: web
    name: blog-api-express
    env: node
    buildCommand: |
      npm install
      npx prisma generate
      npx prisma migrate deploy
    startCommand: npm start
    envVars:
      - key: DATABASE_URL
        value: mysql://heart:Antor%40123@5.9.106.155:3306/ai_blog
      - key: JWT_SECRET
        value: heart
      - key: DB_HOST
        value: 5.9.106.155
      - key: DB_PORT
        value: "3306"
      - key: DB_USER
        value: heart
      - key: DB_PASSWORD
        value: Antor@123
      - key: DB_NAME
        value: ai_blog
      - key: UPLOAD_DIR
        value: ./uploads
