{
  "$schema": "https://cloud.goapp.co.id/schemas/goapp-app.schema.json",
  "name": "my-app",
  "services": {
    "frontend": {
      "type": "web",
      "path": "./frontend",
      "buildEnv": ["NEXT_PUBLIC_API_BASE_URL"],
      "build": "npm ci && npm run build",
      "start": "npm run start",
      "port": 3000,
      "health": "/",
      "resources": {
        "cpu": "1",
        "memory": "1g"
      }
    },
    "api": {
      "type": "api",
      "path": "./backend",
      "build": "pip install -e .",
      "preDeploy": "alembic upgrade head",
      "start": "uvicorn main:app --host 0.0.0.0 --port 8000",
      "port": 8000,
      "health": "/api/v1/health"
    },
    "worker": {
      "type": "worker",
      "path": "./backend",
      "build": "pip install -e .",
      "start": "celery -A app.tasks.celery_app worker --loglevel=info -c 4 -Q default,agent_tasks",
      "restart": "unless-stopped"
    }
  },
  "addons": {
    "postgres": true,
    "redis": true
  }
}