{
  "manifest_version": "1.0.0",
  "template": {
    "id": "fc27ed99-bf7a-426f-a932-11d3b13600bc",
    "slug": "gigapipe-observability",
    "name": "Gigapipe observability",
    "description": "Protected Gigapipe logs, metrics, traces, and profiles.",
    "url": "https://railway.com/deploy/gigapipe-observability",
    "upstream": {
      "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
    }
  },
  "services": [
    {
      "name": "ClickHouse",
      "source": {
        "image": "clickhouse/clickhouse-server:26.3.16.16-alpine@sha256:b45ab149f0d331b944b4aa2ccdd47d0242238fd39e68ec524ad63338e4b9d8f8"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/clickhouse",
      "http": false
    },
    {
      "name": "Gigapipe Gateway",
      "source": {
        "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Gigapipe",
      "source": {
        "image": "ghcr.io/metrico/gigapipe:v5.1.1@sha256:2392ec7f1b1c4e6eecf5565ccf74a8eb3b8d46b7f0fb952e4d765e00e23626a7"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "ClickHouse",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8123"
    },
    {
      "key": "CLICKHOUSE_DB",
      "service": "ClickHouse",
      "description": "Provide a value for CLICKHOUSE_DB.",
      "secret": false,
      "strategy": "default",
      "default": "gigapipe"
    },
    {
      "key": "CLICKHOUSE_USER",
      "service": "ClickHouse",
      "description": "Provide a value for CLICKHOUSE_USER.",
      "secret": false,
      "strategy": "default",
      "default": "gigapipe"
    },
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "ClickHouse",
      "description": "Generated password for private observability storage.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT",
      "service": "ClickHouse",
      "description": "Provide a value for CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PORT",
      "service": "Gigapipe Gateway",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "UPSTREAM",
      "service": "Gigapipe Gateway",
      "description": "Provide a value for UPSTREAM.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GATEWAY_CONFIG",
      "service": "Gigapipe Gateway",
      "description": "Provide a value for GATEWAY_CONFIG.",
      "secret": false,
      "strategy": "default",
      "default": ":8080 {\n  handle /healthz {\n    rewrite * /ready\n    reverse_proxy http://__UPSTREAM__ {\n      header_up Authorization \"Basic __UPSTREAM_AUTH__\"\n    }\n  }\n  @protected not path /healthz\n  basic_auth @protected {\n    __USERNAME__ __PASSWORD_HASH__\n  }\n  handle {\n    reverse_proxy http://__UPSTREAM__\n  }\n}"
    },
    {
      "key": "GATEWAY_PASSWORD",
      "service": "Gigapipe Gateway",
      "description": "Provide a value for GATEWAY_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GATEWAY_USERNAME",
      "service": "Gigapipe Gateway",
      "description": "Provide a value for GATEWAY_USERNAME.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "Gigapipe",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "3100"
    },
    {
      "key": "LOG_LEVEL",
      "service": "Gigapipe",
      "description": "Provide a value for LOG_LEVEL.",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "QRYN_LOGIN",
      "service": "Gigapipe",
      "description": "Username for the explorer and telemetry APIs.",
      "secret": false,
      "strategy": "default",
      "default": "gigapipe"
    },
    {
      "key": "SAMPLES_DAYS",
      "service": "Gigapipe",
      "description": "Retention period for logs, metrics, traces, and profiles.",
      "secret": false,
      "strategy": "default",
      "default": "14"
    },
    {
      "key": "CLICKHOUSE_DB",
      "service": "Gigapipe",
      "description": "Provide a value for CLICKHOUSE_DB.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QRYN_PASSWORD",
      "service": "Gigapipe",
      "description": "Generated password for the explorer and telemetry APIs.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CLICKHOUSE_AUTH",
      "service": "Gigapipe",
      "description": "Provide a value for CLICKHOUSE_AUTH.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CLICKHOUSE_PORT",
      "service": "Gigapipe",
      "description": "Provide a value for CLICKHOUSE_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "9000"
    },
    {
      "key": "CLICKHOUSE_SERVER",
      "service": "Gigapipe",
      "description": "Provide a value for CLICKHOUSE_SERVER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "gigapipe-observability"
      }
    },
    "cli": "railway deploy --template gigapipe-observability",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "fc27ed99-bf7a-426f-a932-11d3b13600bc",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "c72e237f-700e-4fb6-a2ea-b5ac5b37ea75": {
                  "icon": null,
                  "name": "ClickHouse",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/ping",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "clickhouse/clickhouse-server:26.3.16.16-alpine@sha256:b45ab149f0d331b944b4aa2ccdd47d0242238fd39e68ec524ad63338e4b9d8f8"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "8123"
                    },
                    "CLICKHOUSE_DB": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "gigapipe"
                    },
                    "CLICKHOUSE_USER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "gigapipe"
                    },
                    "CLICKHOUSE_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for private observability storage.",
                      "defaultValue": "{{CLICKHOUSE_PASSWORD}}"
                    },
                    "CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "1"
                    }
                  },
                  "volumeMounts": {
                    "c72e237f-700e-4fb6-a2ea-b5ac5b37ea75": {
                      "sizeMB": 5000,
                      "mountPath": "/var/lib/clickhouse"
                    }
                  }
                },
                "db487fde-8ed5-4468-a961-ec63e215e4f9": {
                  "icon": null,
                  "name": "Gigapipe Gateway",
                  "deploy": {
                    "startCommand": "/bin/sh -ec 'password_hash=\"$(caddy hash-password --plaintext \"$GATEWAY_PASSWORD\")\"; upstream_auth=\"$(printf \"%s:%s\" \"$GATEWAY_USERNAME\" \"$GATEWAY_PASSWORD\" | base64 | tr -d \"\\n\")\"; printf \"%s\\n\" \"$GATEWAY_CONFIG\" | sed -e \"s|__USERNAME__|$GATEWAY_USERNAME|g\" -e \"s|__PASSWORD_HASH__|$password_hash|g\" -e \"s|__UPSTREAM_AUTH__|$upstream_auth|g\" -e \"s|__UPSTREAM__|$UPSTREAM|g\" >/tmp/Caddyfile; exec caddy run --config /tmp/Caddyfile --adapter caddyfile'",
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "8080"
                    },
                    "UPSTREAM": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Gigapipe.RAILWAY_PRIVATE_DOMAIN}}:3100"
                    },
                    "GATEWAY_CONFIG": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": ":8080 {\n  handle /healthz {\n    rewrite * /ready\n    reverse_proxy http://__UPSTREAM__ {\n      header_up Authorization \"Basic __UPSTREAM_AUTH__\"\n    }\n  }\n  @protected not path /healthz\n  basic_auth @protected {\n    __USERNAME__ __PASSWORD_HASH__\n  }\n  handle {\n    reverse_proxy http://__UPSTREAM__\n  }\n}"
                    },
                    "GATEWAY_PASSWORD": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Gigapipe.QRYN_PASSWORD}}"
                    },
                    "GATEWAY_USERNAME": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Gigapipe.QRYN_LOGIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8080
                      }
                    }
                  }
                },
                "f6ae36b9-89c8-460c-8333-06c531ed4dfc": {
                  "icon": null,
                  "name": "Gigapipe",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": null,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/metrico/gigapipe:v5.1.1@sha256:2392ec7f1b1c4e6eecf5565ccf74a8eb3b8d46b7f0fb952e4d765e00e23626a7"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "3100"
                    },
                    "LOG_LEVEL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "info"
                    },
                    "QRYN_LOGIN": {
                      "isOptional": false,
                      "description": "Username for the explorer and telemetry APIs.",
                      "defaultValue": "gigapipe"
                    },
                    "SAMPLES_DAYS": {
                      "isOptional": false,
                      "description": "Retention period for logs, metrics, traces, and profiles.",
                      "defaultValue": "14"
                    },
                    "CLICKHOUSE_DB": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{ClickHouse.CLICKHOUSE_DB}}"
                    },
                    "QRYN_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for the explorer and telemetry APIs.",
                      "defaultValue": "{{QRYN_PASSWORD}}"
                    },
                    "CLICKHOUSE_AUTH": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{ClickHouse.CLICKHOUSE_USER}}:${{ClickHouse.CLICKHOUSE_PASSWORD}}"
                    },
                    "CLICKHOUSE_PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "9000"
                    },
                    "CLICKHOUSE_SERVER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{ClickHouse.RAILWAY_PRIVATE_DOMAIN}}"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Gigapipe Gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-05T00:26:23.241Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_bf7c2d953a9049fdb21f",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 49,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Gigapipe Gateway"
  }
}
