{
  "manifest_version": "1.0.0",
  "template": {
    "id": "925da20b-f6dd-44db-a396-7341af8efe36",
    "slug": "sonarqube-or-just-updated-your-scan-hist",
    "name": "SonarQube | (Just Updated) Your Scan History Survives Redeploys, 2GB RAM Required",
    "description": "Self-hosted code scanner. Postgres attached, scans survive redeploys",
    "url": "https://railway.com/deploy/sonarqube-or-just-updated-your-scan-hist",
    "upstream": {
      "image": "ghcr.io/bon5co/sonarqube-railway@sha256:bcf3e0b742aba79f7dd27243122f2bf038b58a5ae171a5b3d3e9bdd594e668b6"
    }
  },
  "services": [
    {
      "name": "sonarqube",
      "source": {
        "image": "ghcr.io/bon5co/sonarqube-railway@sha256:bcf3e0b742aba79f7dd27243122f2bf038b58a5ae171a5b3d3e9bdd594e668b6"
      },
      "needs_volume": true,
      "volume_mount_path": "/opt/sonarqube/extensions",
      "http": true
    },
    {
      "name": "postgres",
      "source": {
        "image": "postgres:17-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "SONAR_JDBC_URL",
      "service": "sonarqube",
      "description": "Provide a value for SONAR_JDBC_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SONAR_JDBC_PASSWORD",
      "service": "sonarqube",
      "description": "Provide a value for SONAR_JDBC_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SONAR_ADMIN_PASSWORD",
      "service": "sonarqube",
      "description": "Provide a value for SONAR_ADMIN_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "sonarqube-or-just-updated-your-scan-hist"
      }
    },
    "cli": "railway deploy --template sonarqube-or-just-updated-your-scan-hist",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "925da20b-f6dd-44db-a396-7341af8efe36",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "459a0660-9d69-4d8d-a14e-82979f312ef1": {
                  "icon": null,
                  "name": "sonarqube",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/system/status",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/bon5co/sonarqube-railway@sha256:bcf3e0b742aba79f7dd27243122f2bf038b58a5ae171a5b3d3e9bdd594e668b6"
                  },
                  "variables": {
                    "SONAR_JDBC_URL": {
                      "isOptional": false,
                      "defaultValue": "jdbc:postgresql://${{postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/postgres"
                    },
                    "SONAR_JDBC_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    },
                    "SONAR_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{SONAR_ADMIN_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "459a0660-9d69-4d8d-a14e-82979f312ef1": {
                      "mountPath": "/opt/sonarqube/extensions"
                    }
                  }
                },
                "94b475e9-f9e2-4aa3-80a4-595a7bda664f": {
                  "icon": null,
                  "name": "postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:17-alpine"
                  },
                  "variables": {
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "94b475e9-f9e2-4aa3-80a4-595a7bda664f": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "sonarqube",
      "method": "GET",
      "path": "/api/system/status",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-11T16:14:44.435Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-10T14:59:36.664Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_22a7c3db13374ff0aa55",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 132,
    "typical_build_seconds": 0,
    "typical_start_seconds": 51,
    "slowest_service": "sonarqube"
  }
}
