module.exports = {
  apps: [
    {
      name: "taskteam-api",
      script: "api/src/index.js",
      cwd: "/opt/task-team",
      instances: 2,
      exec_mode: "cluster",
      env: {
        NODE_ENV: "production",
        PORT: 3000,
        DATABASE_URL: "postgresql://taskteam:TaskTeam2026!@10.10.10.10:5432/taskteam",
        REDIS_URL: "redis://:Redis2026!@10.10.10.10:6379",
        JWT_SECRET: "taskteam-jwt-secret-2026-secure-key",
      GOOGLE_CLIENT_ID: "779417414454-cim05rbg2lg3h212q7pidhb02eo56l62.apps.googleusercontent.com",
      GOOGLE_CLIENT_SECRET: "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",
      OAUTH_CALLBACK_BASE: "https://api.hasdo.info",
        ANTHROPIC_API_KEY: "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",
        NOTION_API_KEY: "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",
        NOTION_TASKS_DB: "659a5381-564a-453a-9e2b-1345c457cca9",
        DEPLOY_SECRET: "taskteam-deploy-2026",
      },
      max_memory_restart: "500M",
      watch: false,
      merge_logs: true,
      log_date_format: "YYYY-MM-DD HH:mm:ss Z"
    },
    {
      name: "taskteam-web",
      script: "node_modules/.bin/next",
      args: "start -p 3001",
      cwd: "/opt/task-team/apps/tasks",
      instances: 1,
      exec_mode: "fork",
      env: {
        NODE_ENV: "production",
        NEXT_PUBLIC_API_URL: "http://localhost:3000"
      },
      max_memory_restart: "500M",
      watch: false,
      merge_logs: true,
      log_date_format: "YYYY-MM-DD HH:mm:ss Z"
    }
  ]
};
