{
  "_comment": [
    "Single source of truth for the CI/CD pipeline (ci/buildspec-ci.yml, ci/buildspec-cd.yml).",
    "Adding a service means adding one entry here - nothing else needs editing.",
    "",
    "  paths        git path prefixes that make this service dirty",
    "  context      docker build context directory",
    "  dockerfile   path to the Dockerfile",
    "  ecr          ECR repository name",
    "  ecsService   ECS service name within the selected environment's cluster ('' = not deployed)",
    "  taskFamily   ECS task definition family",
    "  container    container name inside the task definition",
    "  healthPort   port to probe /healthz on during CI (filemst has no /app/web, its api is :81)",
    "  needsBase    true if the image is built FROM the shared php-nginx base image",
    "  excludePaths subtrees inside 'paths' that belong to ANOTHER service (nibe fe inside nibe)",
    "  healthCmd    override for images without wget/curl (kong ships neither)"
  ],
  "_environments": [
    "Deployment tiers. Select one with `pipeline.py --env <name>` (default: prod).",
    "Both tiers share the ECR repositories - promoting an artifact means deploying the",
    "same sha - but NOT the task-definition families: familyPrefix keeps them apart, so",
    "a demo deploy cannot register a revision of a production family. `latest` is only",
    "moved by prod, so a demo build cannot repoint the tag production last pushed."
  ],
  "environments": {
    "prod": { "cluster": "b2g-prod", "familyPrefix": "b2g-",      "movesLatest": true  },
    "demo": { "cluster": "b2g-demo", "familyPrefix": "b2g-demo-", "movesLatest": false }
  },
  "region": "ap-south-1",
  "baseImage": {
    "ecr": "b2g/php-nginx-base",
    "tag": "8.2",
    "context": "docker/php-nginx",
    "dockerfile": "docker/php-nginx/Dockerfile",
    "paths": [
      "docker/php-nginx/"
    ]
  },
  "services": [
    {
      "name": "micro",
      "paths": [
        "b2g_micro/"
      ],
      "context": "b2g_micro",
      "dockerfile": "b2g_micro/Dockerfile",
      "ecr": "b2g/micro",
      "ecsService": "micro",
      "taskFamily": "b2g-micro",
      "container": "micro",
      "healthPort": 80,
      "needsBase": true
    },
    {
      "name": "usermgmt",
      "paths": [
        "b2g_usermgmt/"
      ],
      "context": "b2g_usermgmt",
      "dockerfile": "b2g_usermgmt/Dockerfile",
      "ecr": "b2g/usermgmt",
      "ecsService": "usermgmt",
      "taskFamily": "b2g-usermgmt",
      "container": "usermgmt",
      "healthPort": 80,
      "needsBase": true
    },
    {
      "name": "profilemgmt",
      "paths": [
        "b2g_profilemgmt/"
      ],
      "context": "b2g_profilemgmt",
      "dockerfile": "b2g_profilemgmt/Dockerfile",
      "ecr": "b2g/profilemgmt",
      "ecsService": "profilemgmt",
      "taskFamily": "b2g-profilemgmt",
      "container": "profilemgmt",
      "healthPort": 80,
      "needsBase": true
    },
    {
      "name": "confmgmt",
      "paths": [
        "b2g_confmgmt/"
      ],
      "context": "b2g_confmgmt",
      "dockerfile": "b2g_confmgmt/Dockerfile",
      "ecr": "b2g/confmgmt",
      "ecsService": "confmgmt",
      "taskFamily": "b2g-confmgmt",
      "container": "confmgmt",
      "healthPort": 80,
      "needsBase": true
    },
    {
      "name": "digitall",
      "paths": [
        "b2g_digitall/"
      ],
      "context": "b2g_digitall",
      "dockerfile": "b2g_digitall/Dockerfile",
      "ecr": "b2g/digitall",
      "ecsService": "digitall",
      "taskFamily": "b2g-digitall",
      "container": "digitall",
      "healthPort": 80,
      "needsBase": true
    },
    {
      "name": "cengex",
      "paths": [
        "b2g_cengex/"
      ],
      "context": "b2g_cengex",
      "dockerfile": "b2g_cengex/Dockerfile",
      "ecr": "b2g/cengex",
      "ecsService": "cengex",
      "taskFamily": "b2g-cengex",
      "container": "cengex",
      "healthPort": 80,
      "needsBase": true
    },
    {
      "name": "gmarketapi",
      "paths": [
        "b2g_gmarketapi/"
      ],
      "context": "b2g_gmarketapi",
      "dockerfile": "b2g_gmarketapi/Dockerfile",
      "ecr": "b2g/gmarketapi",
      "ecsService": "gmarketapi",
      "taskFamily": "b2g-gmarketapi",
      "container": "gmarketapi",
      "healthPort": 80,
      "needsBase": true
    },
    {
      "name": "mail",
      "paths": [
        "b2g_mail/"
      ],
      "context": "b2g_mail",
      "dockerfile": "b2g_mail/Dockerfile",
      "ecr": "b2g/mail",
      "ecsService": "mail",
      "taskFamily": "b2g-mail",
      "container": "mail",
      "healthPort": 80,
      "needsBase": true
    },
    {
      "name": "subpayment",
      "paths": [
        "b2g_subpayment/"
      ],
      "context": "b2g_subpayment",
      "dockerfile": "b2g_subpayment/Dockerfile",
      "ecr": "b2g/subpayment",
      "ecsService": "subpayment",
      "taskFamily": "b2g-subpayment",
      "container": "subpayment",
      "healthPort": 80,
      "needsBase": true
    },
    {
      "name": "zohoapi",
      "paths": [
        "b2g_zohoapi/"
      ],
      "context": "b2g_zohoapi",
      "dockerfile": "b2g_zohoapi/Dockerfile",
      "ecr": "b2g/zohoapi",
      "ecsService": "zohoapi",
      "taskFamily": "b2g-zohoapi",
      "container": "zohoapi",
      "healthPort": 80,
      "needsBase": true
    },
    {
      "name": "filemst",
      "paths": [
        "b2g_filemst/"
      ],
      "context": "b2g_filemst",
      "dockerfile": "b2g_filemst/Dockerfile",
      "ecr": "b2g/filemst",
      "ecsService": "filemst",
      "taskFamily": "b2g-filemst",
      "container": "filemst",
      "healthPort": 81,
      "needsBase": true
    },
    {
      "name": "nibe",
      "paths": [
        "nibe_datamanager/"
      ],
      "excludePaths": [
        "nibe_datamanager/nibedatamanager_fe/"
      ],
      "context": "nibe_datamanager",
      "dockerfile": "nibe_datamanager/Dockerfile",
      "ecr": "b2g/nibe",
      "ecsService": "nibe",
      "taskFamily": "b2g-nibe",
      "container": "nibe",
      "healthPort": 80,
      "needsBase": true
    },
    {
      "name": "kong",
      "paths": [
        "docker/kong/"
      ],
      "context": "docker/kong",
      "dockerfile": "docker/kong/Dockerfile",
      "ecr": "b2g/kong",
      "ecsService": "kong",
      "taskFamily": "b2g-kong",
      "container": "kong",
      "healthPort": 8000,
      "needsBase": false,
      "healthCmd": "kong health"
    },
    {
      "name": "fe-b2g",
      "paths": [
        "b2g/"
      ],
      "context": "b2g",
      "dockerfile": "b2g/Dockerfile",
      "ecr": "b2g/app",
      "ecsService": "fe-b2g",
      "taskFamily": "b2g-fe-b2g",
      "container": "fe-b2g",
      "healthPort": 80,
      "needsBase": false
    },
    {
      "name": "fe-gmarket",
      "paths": [
        "gMarket/"
      ],
      "context": "gMarket",
      "dockerfile": "gMarket/Dockerfile",
      "ecr": "b2g/gmarket",
      "ecsService": "fe-gmarket",
      "taskFamily": "b2g-fe-gmarket",
      "container": "fe-gmarket",
      "healthPort": 80,
      "needsBase": false
    },
    {
      "name": "fe-website",
      "paths": [
        "b2g_website/"
      ],
      "context": "b2g_website",
      "dockerfile": "b2g_website/Dockerfile",
      "ecr": "b2g/website",
      "ecsService": "fe-website",
      "taskFamily": "b2g-fe-website",
      "container": "fe-website",
      "healthPort": 80,
      "needsBase": false
    },
    {
      "name": "fe-filems",
      "paths": [
        "b2g_filems_fe/"
      ],
      "context": "b2g_filems_fe",
      "dockerfile": "b2g_filems_fe/Dockerfile",
      "ecr": "b2g/filems-fe",
      "ecsService": "fe-filems",
      "taskFamily": "b2g-fe-filems",
      "container": "fe-filems",
      "healthPort": 80,
      "needsBase": false
    },
    {
      "name": "fe-nibe",
      "paths": [
        "nibe_datamanager/nibedatamanager_fe/"
      ],
      "context": "nibe_datamanager/nibedatamanager_fe",
      "dockerfile": "nibe_datamanager/nibedatamanager_fe/Dockerfile",
      "ecr": "b2g/nibe-fe",
      "ecsService": "fe-nibe",
      "taskFamily": "b2g-fe-nibe",
      "container": "fe-nibe",
      "healthPort": 80,
      "needsBase": false
    }
  ]
}
