{
  "manifest_version": "1.0.0",
  "template": {
    "id": "dbbdfc79-5f64-40b6-a955-e4fc5132ec72",
    "slug": "grafana-3",
    "name": "Grafana",
    "description": "Grafana — observability dashboards for metrics, logs, and alerts",
    "url": "https://railway.com/deploy/grafana-3",
    "upstream": {
      "repo_url": "https://github.com/INAPP-Mobile/grafana"
    }
  },
  "services": [
    {
      "name": "grafana",
      "source": {
        "repo": "https://github.com/INAPP-Mobile/grafana"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/grafana",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "grafana",
      "description": "Railway HTTP port (must match GF_SERVER_HTTP_PORT)",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "GF_LOG_MODE",
      "service": "grafana",
      "description": "Log to console (Railway captures stdout)",
      "secret": false,
      "strategy": "default",
      "default": "console"
    },
    {
      "key": "GF_PATHS_DATA",
      "service": "grafana",
      "description": "Persistent data directory (must match volume mount path)",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/grafana"
    },
    {
      "key": "GF_PATHS_LOGS",
      "service": "grafana",
      "description": "Grafana log directory",
      "secret": false,
      "strategy": "default",
      "default": "/var/log/grafana"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "grafana",
      "description": "Run as root so entrypoint can chown the volume at startup. Grafana's /run.sh drops to UID 472 internally.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "GF_PATHS_PLUGINS",
      "service": "grafana",
      "description": "Plugins install directory (must be on persistent volume)",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/grafana/plugins"
    },
    {
      "key": "GF_SERVER_ROOT_URL",
      "service": "grafana",
      "description": "Public-facing URL — uses Railway domain. Required for correct redirects.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "GF_SERVER_HTTP_ADDR",
      "service": "grafana",
      "description": "Bind address (0.0.0.0 for all interfaces)",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "GF_SERVER_HTTP_PORT",
      "service": "grafana",
      "description": "HTTP listen port (must match PORT and EXPOSE in Dockerfile)",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "GF_PATHS_PROVISIONING",
      "service": "grafana",
      "description": "Provisioning configs directory",
      "secret": false,
      "strategy": "default",
      "default": "/etc/grafana/provisioning"
    },
    {
      "key": "GF_SECURITY_ADMIN_USER",
      "service": "grafana",
      "description": "Grafana admin username",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "GF_SECURITY_SECRET_KEY",
      "service": "grafana",
      "description": "Session encryption key — auto-generated. Changing it invalidates all sessions.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "GF_USERS_ALLOW_SIGN_UP",
      "service": "grafana",
      "description": "Disable public user registration",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "GF_SECURITY_ADMIN_PASSWORD",
      "service": "grafana",
      "description": "Grafana admin password — auto-generated. Save it after deploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "GF_SECURITY_ALLOW_EMBEDDING",
      "service": "grafana",
      "description": "Allow Grafana dashboards to be embedded in iframes",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "GF_ANALYTICS_REPORTING_ENABLED",
      "service": "grafana",
      "description": "Disable telemetry reporting",
      "secret": false,
      "strategy": "default",
      "default": "false"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "grafana-3"
      }
    },
    "cli": "railway deploy --template grafana-3",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "dbbdfc79-5f64-40b6-a955-e4fc5132ec72",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "ecada478-5079-41c9-a171-ee8e5eea3f5e": {
                  "icon": null,
                  "name": "grafana",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/INAPP-Mobile/grafana",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Railway HTTP port (must match GF_SERVER_HTTP_PORT)",
                      "defaultValue": "3000"
                    },
                    "GF_LOG_MODE": {
                      "isOptional": false,
                      "description": "Log to console (Railway captures stdout)",
                      "defaultValue": "console"
                    },
                    "GF_PATHS_DATA": {
                      "isOptional": false,
                      "description": "Persistent data directory (must match volume mount path)",
                      "defaultValue": "/var/lib/grafana"
                    },
                    "GF_PATHS_LOGS": {
                      "isOptional": false,
                      "description": "Grafana log directory",
                      "defaultValue": "/var/log/grafana"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root so entrypoint can chown the volume at startup. Grafana's /run.sh drops to UID 472 internally.",
                      "defaultValue": "0"
                    },
                    "GF_PATHS_PLUGINS": {
                      "isOptional": false,
                      "description": "Plugins install directory (must be on persistent volume)",
                      "defaultValue": "/var/lib/grafana/plugins"
                    },
                    "GF_SERVER_ROOT_URL": {
                      "isOptional": false,
                      "description": "Public-facing URL — uses Railway domain. Required for correct redirects.",
                      "defaultValue": "https://${{grafana.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "GF_SERVER_HTTP_ADDR": {
                      "isOptional": false,
                      "description": "Bind address (0.0.0.0 for all interfaces)",
                      "defaultValue": "0.0.0.0"
                    },
                    "GF_SERVER_HTTP_PORT": {
                      "isOptional": false,
                      "description": "HTTP listen port (must match PORT and EXPOSE in Dockerfile)",
                      "defaultValue": "3000"
                    },
                    "GF_PATHS_PROVISIONING": {
                      "isOptional": false,
                      "description": "Provisioning configs directory",
                      "defaultValue": "/etc/grafana/provisioning"
                    },
                    "GF_SECURITY_ADMIN_USER": {
                      "isOptional": false,
                      "description": "Grafana admin username",
                      "defaultValue": "admin"
                    },
                    "GF_SECURITY_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Session encryption key — auto-generated. Changing it invalidates all sessions.",
                      "defaultValue": "{{GF_SECURITY_SECRET_KEY}}"
                    },
                    "GF_USERS_ALLOW_SIGN_UP": {
                      "isOptional": false,
                      "description": "Disable public user registration",
                      "defaultValue": "false"
                    },
                    "GF_SECURITY_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Grafana admin password — auto-generated. Save it after deploy.",
                      "defaultValue": "{{GF_SECURITY_ADMIN_PASSWORD}}"
                    },
                    "GF_SECURITY_ALLOW_EMBEDDING": {
                      "isOptional": false,
                      "description": "Allow Grafana dashboards to be embedded in iframes",
                      "defaultValue": "false"
                    },
                    "GF_ANALYTICS_REPORTING_ENABLED": {
                      "isOptional": false,
                      "description": "Disable telemetry reporting",
                      "defaultValue": "false"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "ecada478-5079-41c9-a171-ee8e5eea3f5e": {
                      "mountPath": "/var/lib/grafana"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "grafana",
      "method": "GET",
      "path": "/api/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-22T16:14:56.866Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-22T14:03:19.658Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_ed3be59d95d648f6b1d5",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 117,
    "typical_build_seconds": 40,
    "typical_start_seconds": 30,
    "slowest_service": "grafana"
  }
}
