{
  "manifest_version": "1.0.0",
  "template": {
    "id": "ea633582-c6b0-4cac-ad7d-f47157188c08",
    "slug": "fastapi-service-with-a-firewall-via-clou",
    "name": "FastAPI service with a firewall (via cloudflared)",
    "description": "Protect a web service of any kind (like FastAPI) behind a cloudflare tunnel",
    "url": "https://railway.com/deploy/fastapi-service-with-a-firewall-via-clou"
  },
  "services": [
    {
      "name": "Cloudflared",
      "source": {
        "image": "cloudflare/cloudflared"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "pydantic-chat-app",
      "source": {
        "repo": "https://github.com/dsfaccini/pydantic-chat-app"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "TUNNEL_TOKEN",
      "service": "Cloudflared",
      "description": "Secret token from Cloudflare's Zero Trust dashboard",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "APP_HOST",
      "service": "pydantic-chat-app",
      "description": "Set to `::` because railway's internal network is IPv6 only",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "APP_PORT",
      "service": "pydantic-chat-app",
      "description": "The port needs to be the one that your app runs on",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "LOGFIRE_SERVICE_NAME",
      "service": "pydantic-chat-app",
      "description": "For querying logs of this application",
      "secret": false,
      "strategy": "default",
      "default": "pydantic-ai-app"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "fastapi-service-with-a-firewall-via-clou"
      }
    },
    "cli": "railway deploy --template fastapi-service-with-a-firewall-via-clou",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "ea633582-c6b0-4cac-ad7d-f47157188c08",
            "serializedConfig": {
              "services": {
                "2983601f-c67b-4723-a518-3bf652309309": {
                  "icon": "https://one.dash.cloudflare.com/assets/favicon.ico?f=.png",
                  "name": "Cloudflared",
                  "deploy": {
                    "startCommand": "cloudflared tunnel --no-autoupdate run",
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "cloudflare/cloudflared"
                  },
                  "variables": {
                    "TUNNEL_TOKEN": {
                      "isOptional": false,
                      "description": "Secret token from Cloudflare's Zero Trust dashboard",
                      "defaultValue": "{{TUNNEL_TOKEN}}"
                    }
                  }
                },
                "811b430d-d639-491e-a835-9476fa70a2ef": {
                  "icon": "https://logo.svgcdn.com/simple-icons/pydantic-dark.png",
                  "name": "pydantic-chat-app",
                  "deploy": {
                    "startCommand": "sh -c 'uv run alembic upgrade head && python -m uvicorn src.app:app --host :: --port ${PORT:-8080}'",
                    "healthcheckPath": null
                  },
                  "source": {
                    "repo": "https://github.com/dsfaccini/pydantic-chat-app",
                    "rootDirectory": null
                  },
                  "variables": {
                    "APP_HOST": {
                      "isOptional": true,
                      "description": "Set to `::` because railway's internal network is IPv6 only",
                      "defaultValue": "::"
                    },
                    "APP_PORT": {
                      "isOptional": false,
                      "description": "The port needs to be the one that your app runs on",
                      "defaultValue": "8080"
                    },
                    "LOGFIRE_TOKEN": {
                      "isOptional": true,
                      "description": "You can setup logfire for observability of your application",
                      "defaultValue": ""
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "For AI applications",
                      "defaultValue": ""
                    },
                    "LOGFIRE_SERVICE_NAME": {
                      "isOptional": true,
                      "description": "For querying logs of this application",
                      "defaultValue": "pydantic-ai-app"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": false
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-21T01:26:12.143Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_014db6a953f64cbea1e6",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "FAILED,SUCCESS"
      }
    ]
  }
}
