{
  "manifest_version": "1.0.0",
  "template": {
    "id": "3e88ac88-ff81-44ec-b199-ae9a1286a9c9",
    "slug": "manyfold-3d-model-library",
    "name": "Manyfold 3D model library",
    "description": "Protected Manyfold 3D library with PostgreSQL and durable models.",
    "url": "https://railway.com/deploy/manyfold-3d-model-library",
    "upstream": {
      "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
    }
  },
  "services": [
    {
      "name": "PostgreSQL",
      "source": {
        "image": "postgres:16.10-alpine@sha256:029660641a0cfc575b14f336ba448fb8a75fd595d42e1fa316b9fb4378742297"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Manyfold Gateway",
      "source": {
        "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.4.0-alpine@sha256:4eec4565e45aa0b3966554c866bc73211e281b0b3d89fe9a33c982e6faca809d"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Manyfold",
      "source": {
        "image": "manyfold3d/manyfold:0.147.1@sha256:8ff288d34ae2a5704c9929b8284612ee8dcc4a9e5b2bd33724c99391cdff0811"
      },
      "needs_volume": true,
      "volume_mount_path": "/models",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "PostgreSQL",
      "description": "Initialize PostgreSQL below the volume root.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "PostgreSQL",
      "description": "Provide a value for POSTGRES_DB.",
      "secret": false,
      "strategy": "default",
      "default": "manyfold"
    },
    {
      "key": "POSTGRES_USER",
      "service": "PostgreSQL",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "default",
      "default": "manyfold"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "PostgreSQL",
      "description": "Generated database password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "Manyfold Gateway",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "UPSTREAM",
      "service": "Manyfold Gateway",
      "description": "Private Manyfold endpoint.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GATEWAY_CONFIG",
      "service": "Manyfold Gateway",
      "description": "Authenticated reverse-proxy configuration.",
      "secret": false,
      "strategy": "default",
      "default": ":8080 {\n  handle /healthz {\n    rewrite * /health\n    reverse_proxy http://__UPSTREAM__\n  }\n  @protected not path /healthz\n  basic_auth @protected {\n    __USERNAME__ __PASSWORD_HASH__\n  }\n  handle {\n    reverse_proxy http://__UPSTREAM__ {\n      header_up -Authorization\n      header_up X-Forwarded-Proto {http.request.header.X-Forwarded-Proto}\n    }\n  }\n}"
    },
    {
      "key": "GATEWAY_PASSWORD",
      "service": "Manyfold Gateway",
      "description": "Generated protected setup and application password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "GATEWAY_USERNAME",
      "service": "Manyfold Gateway",
      "description": "Protected setup and application username.",
      "secret": false,
      "strategy": "default",
      "default": "manyfold"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Generated Redis password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PGID",
      "service": "Manyfold",
      "description": "Non-root application group ID.",
      "secret": false,
      "strategy": "default",
      "default": "1000"
    },
    {
      "key": "PORT",
      "service": "Manyfold",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "3214"
    },
    {
      "key": "PUID",
      "service": "Manyfold",
      "description": "Non-root application user ID.",
      "secret": false,
      "strategy": "default",
      "default": "1000"
    },
    {
      "key": "MULTIUSER",
      "service": "Manyfold",
      "description": "Keep the initial deployment in protected single-user mode.",
      "secret": false,
      "strategy": "default",
      "default": "disabled"
    },
    {
      "key": "REDIS_URL",
      "service": "Manyfold",
      "description": "Authenticated private Redis URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PLUGINS_PATH",
      "service": "Manyfold",
      "description": "Make the model volume writable through the upstream entrypoint.",
      "secret": false,
      "strategy": "default",
      "default": "/models"
    },
    {
      "key": "REGISTRATION",
      "service": "Manyfold",
      "description": "Keep public registration disabled.",
      "secret": false,
      "strategy": "default",
      "default": "disabled"
    },
    {
      "key": "DATABASE_HOST",
      "service": "Manyfold",
      "description": "Private PostgreSQL host.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DATABASE_NAME",
      "service": "Manyfold",
      "description": "Provide a value for DATABASE_NAME.",
      "secret": false,
      "strategy": "default",
      "default": "manyfold"
    },
    {
      "key": "DATABASE_PORT",
      "service": "Manyfold",
      "description": "Provide a value for DATABASE_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "DATABASE_USER",
      "service": "Manyfold",
      "description": "Provide a value for DATABASE_USER.",
      "secret": false,
      "strategy": "default",
      "default": "manyfold"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "Manyfold",
      "description": "Generated Rails signing and encryption secret.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WEB_CONCURRENCY",
      "service": "Manyfold",
      "description": "One Puma worker for the starter memory target.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "DATABASE_ADAPTER",
      "service": "Manyfold",
      "description": "Provide a value for DATABASE_ADAPTER.",
      "secret": false,
      "strategy": "default",
      "default": "postgresql"
    },
    {
      "key": "DATABASE_PASSWORD",
      "service": "Manyfold",
      "description": "Referenced PostgreSQL password.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILS_MAX_THREADS",
      "service": "Manyfold",
      "description": "Bound Rails threads and database connections.",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "DEFAULT_WORKER_CONCURRENCY",
      "service": "Manyfold",
      "description": "Bound regular scan and job concurrency.",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "PERFORMANCE_WORKER_CONCURRENCY",
      "service": "Manyfold",
      "description": "Run one performance worker task at a time.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "manyfold-3d-model-library"
      }
    },
    "cli": "railway deploy --template manyfold-3d-model-library",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "3e88ac88-ff81-44ec-b199-ae9a1286a9c9",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "01b3ae0e-a7ce-44a6-b8c3-4e82ed429f4c": {
                  "icon": null,
                  "name": "PostgreSQL",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": null,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:16.10-alpine@sha256:029660641a0cfc575b14f336ba448fb8a75fd595d42e1fa316b9fb4378742297"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Initialize PostgreSQL below the volume root.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "manyfold"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "manyfold"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated database password.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "01b3ae0e-a7ce-44a6-b8c3-4e82ed429f4c": {
                      "sizeMB": 5000,
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "19ec50bd-6ece-4239-b2a0-fe1088f50546": {
                  "icon": null,
                  "name": "Manyfold Gateway",
                  "deploy": {
                    "startCommand": "/bin/sh -ec 'password_hash=\"$(caddy hash-password --plaintext \"$GATEWAY_PASSWORD\")\"; printf \"%s\\n\" \"$GATEWAY_CONFIG\" | sed -e \"s|__USERNAME__|$GATEWAY_USERNAME|g\" -e \"s|__PASSWORD_HASH__|$password_hash|g\" -e \"s|__UPSTREAM__|$UPSTREAM|g\" >/tmp/Caddyfile; exec caddy run --config /tmp/Caddyfile --adapter caddyfile'",
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "8080"
                    },
                    "UPSTREAM": {
                      "isOptional": false,
                      "description": "Private Manyfold endpoint.",
                      "defaultValue": "${{Manyfold.RAILWAY_PRIVATE_DOMAIN}}:3214"
                    },
                    "GATEWAY_CONFIG": {
                      "isOptional": false,
                      "description": "Authenticated reverse-proxy configuration.",
                      "defaultValue": ":8080 {\n  handle /healthz {\n    rewrite * /health\n    reverse_proxy http://__UPSTREAM__\n  }\n  @protected not path /healthz\n  basic_auth @protected {\n    __USERNAME__ __PASSWORD_HASH__\n  }\n  handle {\n    reverse_proxy http://__UPSTREAM__ {\n      header_up -Authorization\n      header_up X-Forwarded-Proto {http.request.header.X-Forwarded-Proto}\n    }\n  }\n}"
                    },
                    "GATEWAY_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated protected setup and application password.",
                      "defaultValue": "{{GATEWAY_PASSWORD}}"
                    },
                    "GATEWAY_USERNAME": {
                      "isOptional": false,
                      "description": "Protected setup and application username.",
                      "defaultValue": "manyfold"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8080
                      }
                    }
                  }
                },
                "3765efbc-5a08-4b7e-97fc-7959808e5a63": {
                  "icon": null,
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -ec 'exec redis-server --requirepass \"$REDIS_PASSWORD\" --maxmemory-policy noeviction'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": null,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.4.0-alpine@sha256:4eec4565e45aa0b3966554c866bc73211e281b0b3d89fe9a33c982e6faca809d"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated Redis password.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "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."
                  }
                },
                "c06cc588-2b13-4afb-bc2e-cef067165ebe": {
                  "icon": null,
                  "name": "Manyfold",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "manyfold3d/manyfold:0.147.1@sha256:8ff288d34ae2a5704c9929b8284612ee8dcc4a9e5b2bd33724c99391cdff0811"
                  },
                  "variables": {
                    "PGID": {
                      "isOptional": false,
                      "description": "Non-root application group ID.",
                      "defaultValue": "1000"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "3214"
                    },
                    "PUID": {
                      "isOptional": false,
                      "description": "Non-root application user ID.",
                      "defaultValue": "1000"
                    },
                    "MULTIUSER": {
                      "isOptional": false,
                      "description": "Keep the initial deployment in protected single-user mode.",
                      "defaultValue": "disabled"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Authenticated private Redis URL.",
                      "defaultValue": "redis://default:${{Redis.REDIS_PASSWORD}}@${{Redis.RAILWAY_PRIVATE_DOMAIN}}:6379/1"
                    },
                    "PLUGINS_PATH": {
                      "isOptional": false,
                      "description": "Make the model volume writable through the upstream entrypoint.",
                      "defaultValue": "/models"
                    },
                    "REGISTRATION": {
                      "isOptional": false,
                      "description": "Keep public registration disabled.",
                      "defaultValue": "disabled"
                    },
                    "DATABASE_HOST": {
                      "isOptional": false,
                      "description": "Private PostgreSQL host.",
                      "defaultValue": "${{PostgreSQL.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DATABASE_NAME": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "manyfold"
                    },
                    "DATABASE_PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "5432"
                    },
                    "DATABASE_USER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "manyfold"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "Generated Rails signing and encryption secret.",
                      "defaultValue": "{{SECRET_KEY_BASE}}"
                    },
                    "WEB_CONCURRENCY": {
                      "isOptional": false,
                      "description": "One Puma worker for the starter memory target.",
                      "defaultValue": "1"
                    },
                    "DATABASE_ADAPTER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "postgresql"
                    },
                    "DATABASE_PASSWORD": {
                      "isOptional": false,
                      "description": "Referenced PostgreSQL password.",
                      "defaultValue": "${{PostgreSQL.POSTGRES_PASSWORD}}"
                    },
                    "RAILS_MAX_THREADS": {
                      "isOptional": false,
                      "description": "Bound Rails threads and database connections.",
                      "defaultValue": "5"
                    },
                    "DEFAULT_WORKER_CONCURRENCY": {
                      "isOptional": false,
                      "description": "Bound regular scan and job concurrency.",
                      "defaultValue": "2"
                    },
                    "PERFORMANCE_WORKER_CONCURRENCY": {
                      "isOptional": false,
                      "description": "Run one performance worker task at a time.",
                      "defaultValue": "1"
                    }
                  },
                  "volumeMounts": {
                    "c06cc588-2b13-4afb-bc2e-cef067165ebe": {
                      "sizeMB": 5000,
                      "mountPath": "/models"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Manyfold Gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T10:14:45.332Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-05T00:05:02.463Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_714d40ffd9944fe69233",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 147,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "Manyfold Gateway"
  }
}
