{
  "manifest_version": "1.0.0",
  "template": {
    "id": "2dc6661d-b5cf-4db6-80b9-bfaa25bc9c8a",
    "slug": "flipt-v2",
    "name": "Flipt",
    "description": "Run Flipt: REST, gRPC and OpenFeature flag evaluation on your own server",
    "url": "https://railway.com/deploy/flipt-v2",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/flipt-railway"
    }
  },
  "services": [
    {
      "name": "flipt",
      "source": {
        "repo": "https://github.com/gridalpha/flipt-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/opt/flipt",
      "http": false
    },
    {
      "name": "gateway",
      "source": {
        "repo": "https://github.com/gridalpha/flipt-railway"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "flipt",
      "description": "HTTP port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "PRIVATE_URL",
      "service": "flipt",
      "description": "Private address for the gateway",
      "secret": false,
      "strategy": "default",
      "default": "http://flipt.railway.internal:8080"
    },
    {
      "key": "FLIPT_LOG_LEVEL",
      "service": "flipt",
      "description": "Log verbosity, DEBUG when troubleshooting",
      "secret": false,
      "strategy": "default",
      "default": "INFO"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "flipt",
      "description": "Selects this service's Dockerfile",
      "secret": false,
      "strategy": "default",
      "default": "flipt/Dockerfile"
    },
    {
      "key": "FLIPT_AUTHENTICATION_REQUIRED",
      "service": "flipt",
      "description": "Reject unauthenticated API calls",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "flipt",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "FLIPT_AUTHENTICATION_METHODS_TOKEN_ENABLED",
      "service": "flipt",
      "description": "Enable static API tokens",
      "secret": true,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "FLIPT_AUTHENTICATION_METHODS_TOKEN_STORAGE_TYPE",
      "service": "flipt",
      "description": "Token storage backend",
      "secret": true,
      "strategy": "default",
      "default": "static"
    },
    {
      "key": "FLIPT_AUTHENTICATION_METHODS_TOKEN_STORAGE_TOKENS_ADMIN_CREDENTIAL",
      "service": "flipt",
      "description": "API token for SDKs",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PORT",
      "service": "gateway",
      "description": "HTTP port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "FLIPT_UPSTREAM",
      "service": "gateway",
      "description": "Private address of the Flipt server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "FLIPT_AUTH_TOKEN",
      "service": "gateway",
      "description": "Token sent upstream",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GATEWAY_PASSWORD",
      "service": "gateway",
      "description": "Basic-auth password for the UI",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "GATEWAY_USERNAME",
      "service": "gateway",
      "description": "Basic-auth username for the UI",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "gateway",
      "description": "Selects this service's Dockerfile",
      "secret": false,
      "strategy": "default",
      "default": "gateway/Dockerfile"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "gateway",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "15"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "flipt-v2"
      }
    },
    "cli": "railway deploy --template flipt-v2",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "2dc6661d-b5cf-4db6-80b9-bfaa25bc9c8a",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "8afd6559-11e9-4016-b313-6aa3d8867fce": {
                  "icon": "https://cdn.jsdelivr.net/gh/flipt-io/flipt@v2.12.0/ui/src/assets/logo-flag.png",
                  "name": "flipt",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/flipt-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Railway health-checks",
                      "defaultValue": "8080"
                    },
                    "PRIVATE_URL": {
                      "isOptional": false,
                      "description": "Private address for the gateway",
                      "defaultValue": "http://flipt.railway.internal:8080"
                    },
                    "FLIPT_LOG_LEVEL": {
                      "isOptional": true,
                      "description": "Log verbosity, DEBUG when troubleshooting",
                      "defaultValue": "INFO"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Selects this service's Dockerfile",
                      "defaultValue": "flipt/Dockerfile"
                    },
                    "FLIPT_AUTHENTICATION_REQUIRED": {
                      "isOptional": false,
                      "description": "Reject unauthenticated API calls",
                      "defaultValue": "true"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "30"
                    },
                    "FLIPT_AUTHENTICATION_METHODS_TOKEN_ENABLED": {
                      "isOptional": false,
                      "description": "Enable static API tokens",
                      "defaultValue": "true"
                    },
                    "FLIPT_AUTHENTICATION_METHODS_TOKEN_STORAGE_TYPE": {
                      "isOptional": false,
                      "description": "Token storage backend",
                      "defaultValue": "static"
                    },
                    "FLIPT_AUTHENTICATION_METHODS_TOKEN_STORAGE_TOKENS_ADMIN_CREDENTIAL": {
                      "isOptional": false,
                      "description": "API token for SDKs",
                      "defaultValue": "{{FLIPT_AUTHENTICATION_METHODS_TOKEN_STORAGE_TOKENS_ADMIN_CREDENTIAL}}"
                    }
                  },
                  "volumeMounts": {
                    "8afd6559-11e9-4016-b313-6aa3d8867fce": {
                      "mountPath": "/var/opt/flipt"
                    }
                  }
                },
                "fc9e8e4f-1362-47a7-8bb8-a1e19bbdd84c": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/caddy.svg",
                  "name": "gateway",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/flipt-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Railway health-checks",
                      "defaultValue": "8080"
                    },
                    "FLIPT_UPSTREAM": {
                      "isOptional": false,
                      "description": "Private address of the Flipt server",
                      "defaultValue": "${{flipt.PRIVATE_URL}}"
                    },
                    "FLIPT_AUTH_TOKEN": {
                      "isOptional": false,
                      "description": "Token sent upstream",
                      "defaultValue": "${{flipt.FLIPT_AUTHENTICATION_METHODS_TOKEN_STORAGE_TOKENS_ADMIN_CREDENTIAL}}"
                    },
                    "GATEWAY_PASSWORD": {
                      "isOptional": false,
                      "description": "Basic-auth password for the UI",
                      "defaultValue": "{{GATEWAY_PASSWORD}}"
                    },
                    "GATEWAY_USERNAME": {
                      "isOptional": true,
                      "description": "Basic-auth username for the UI",
                      "defaultValue": "admin"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Selects this service's Dockerfile",
                      "defaultValue": "gateway/Dockerfile"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "15"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-16T22:14:52.145Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-16T19:55:15.678Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_f96edbd7e5704ab6b44f",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 190,
    "typical_build_seconds": 163,
    "typical_start_seconds": 10,
    "slowest_service": "gateway"
  }
}
