{
  "manifest_version": "1.0.0",
  "template": {
    "id": "9fde497d-35b8-494f-8453-d499a63afb28",
    "slug": "public-buckets",
    "name": "public-buckets",
    "description": "Make your Railway Buckets public and geo-distributed.",
    "url": "https://railway.com/deploy/public-buckets",
    "upstream": {
      "image": "xlab/cdn-s3-go:v1"
    }
  },
  "services": [
    {
      "name": "webserver",
      "source": {
        "image": "xlab/cdn-s3-go:v1"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "url-cache",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "CDN_URL_CACHE_REDIS",
      "service": "webserver",
      "description": "Redis connection string for pre-signed URL caching.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CDN_BUCKET_PUBLIC_NAMES",
      "service": "webserver",
      "description": "Comma-separated list of public bucket names.",
      "secret": false,
      "strategy": "default",
      "default": "example"
    },
    {
      "key": "CDN_BUCKET_REGION_ALIASES",
      "service": "webserver",
      "description": "Comma-separated list of region aliases.",
      "secret": false,
      "strategy": "default",
      "default": "us"
    },
    {
      "key": "CDN_BUCKET_NAME_example_us",
      "service": "webserver",
      "description": "Provide a value for CDN_BUCKET_NAME_example_us.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CDN_BUCKET_REGION_example_us",
      "service": "webserver",
      "description": "Provide a value for CDN_BUCKET_REGION_example_us.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CDN_BUCKET_ENDPOINT_example_us",
      "service": "webserver",
      "description": "Provide a value for CDN_BUCKET_ENDPOINT_example_us.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CDN_BUCKET_ACCESS_KEY_ID_example_us",
      "service": "webserver",
      "description": "Provide a value for CDN_BUCKET_ACCESS_KEY_ID_example_us.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CDN_BUCKET_SECRET_ACCESS_KEY_example_us",
      "service": "webserver",
      "description": "Provide a value for CDN_BUCKET_SECRET_ACCESS_KEY_example_us.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISHOST",
      "service": "url-cache",
      "description": "Provide a value for REDISHOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "url-cache",
      "description": "Provide a value for REDISPORT.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "url-cache",
      "description": "Provide a value for REDISUSER.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "url-cache",
      "description": "Connection string for connecting to redis using the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "url-cache",
      "description": "Provide a value for REDISPASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "url-cache",
      "description": "Provide a value for REDIS_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "url-cache",
      "description": "Connection string for connecting to redis externally",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "public-buckets"
      }
    },
    "cli": "railway deploy --template public-buckets",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "9fde497d-35b8-494f-8453-d499a63afb28",
            "serializedConfig": {
              "buckets": {
                "f0967b19-9a4d-4d43-989c-dbaa49fadee7": {
                  "name": "example-bucket"
                }
              },
              "services": {
                "a1dd9578-045b-40ce-8150-c879d8be5b31": {
                  "icon": "https://devicons.railway.app/golang",
                  "name": "webserver",
                  "deploy": {
                    "startCommand": "/app/cdn-s3-go start",
                    "healthcheckPath": "/health"
                  },
                  "source": {
                    "image": "xlab/cdn-s3-go:v1"
                  },
                  "variables": {
                    "CDN_URL_CACHE_REDIS": {
                      "isOptional": true,
                      "description": "Redis connection string for pre-signed URL caching.",
                      "defaultValue": "${{url-cache.REDIS_URL}}"
                    },
                    "CDN_BUCKET_PUBLIC_NAMES": {
                      "description": "Comma-separated list of public bucket names.",
                      "defaultValue": "example"
                    },
                    "CDN_BUCKET_REGION_ALIASES": {
                      "description": "Comma-separated list of region aliases.",
                      "defaultValue": "us"
                    },
                    "CDN_BUCKET_NAME_example_us": {
                      "description": "",
                      "defaultValue": "${{example-bucket.BUCKET}}}}"
                    },
                    "CDN_BUCKET_REGION_example_us": {
                      "description": "",
                      "defaultValue": "${{example-bucket.REGION}}"
                    },
                    "CDN_BUCKET_ENDPOINT_example_us": {
                      "description": "",
                      "defaultValue": "${{example-bucket.ENDPOINT}}"
                    },
                    "CDN_BUCKET_PATH_PREFIX_example_us": {
                      "isOptional": true,
                      "description": "Controls whether files are not in the root of the bucket, but in prefix (e.g. /public)",
                      "defaultValue": ""
                    },
                    "CDN_BUCKET_ACCESS_KEY_ID_example_us": {
                      "description": "",
                      "defaultValue": "${{example-bucket.ACCESS_KEY_ID}}"
                    },
                    "CDN_BUCKET_SECRET_ACCESS_KEY_example_us": {
                      "description": "",
                      "defaultValue": "${{example-bucket.SECRET_ACCESS_KEY}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "edec4387-aed8-49ec-af03-1d9155814d45": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "url-cache",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\""
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Connection string for connecting to redis using the private network",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "description": "Connection string for connecting to redis externally",
                      "defaultValue": "redis://default:${{ REDIS_PASSWORD }}@${{ RAILWAY_TCP_PROXY_DOMAIN }}:${{ RAILWAY_TCP_PROXY_PORT }}"
                    }
                  },
                  "networking": {},
                  "volumeMounts": {
                    "edec4387-aed8-49ec-af03-1d9155814d45": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "webserver",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-14T04:14:36.069Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-14T01:03:34.110Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_001eba1c7b8c40899ab4",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ]
  }
}
