{
  "manifest_version": "1.0.0",
  "template": {
    "id": "de3d421e-926f-41d1-9bab-9518f9ca30e9",
    "slug": "convertx-file-converter",
    "name": "ConvertX file converter",
    "description": "Protected ConvertX conversion with persistent accounts and history.",
    "url": "https://railway.com/deploy/convertx-file-converter",
    "upstream": {
      "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
    }
  },
  "services": [
    {
      "name": "ConvertX Gateway",
      "source": {
        "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "ConvertX",
      "source": {
        "image": "ghcr.io/c4illin/convertx:v0.18.0@sha256:b515b04bfd25298a5cdc775b2fcd48b9399bab658ce13e2598b65df1b16098c8"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "ConvertX Gateway",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "UPSTREAM",
      "service": "ConvertX Gateway",
      "description": "Provide a value for UPSTREAM.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GATEWAY_CONFIG",
      "service": "ConvertX Gateway",
      "description": "Provide a value for GATEWAY_CONFIG.",
      "secret": false,
      "strategy": "default",
      "default": ":8080 {\n  handle /healthz {\n    rewrite * /healthcheck\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    }\n  }\n}"
    },
    {
      "key": "GATEWAY_PASSWORD",
      "service": "ConvertX Gateway",
      "description": "Generated public converter gateway password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "GATEWAY_USERNAME",
      "service": "ConvertX Gateway",
      "description": "Public converter gateway username.",
      "secret": false,
      "strategy": "default",
      "default": "convertx"
    },
    {
      "key": "PORT",
      "service": "ConvertX",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "JWT_SECRET",
      "service": "ConvertX",
      "description": "Generated session-signing secret.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MAX_CONVERT_PROCESS",
      "service": "ConvertX",
      "description": "Maximum parallel conversion processes.",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "ACCOUNT_REGISTRATION",
      "service": "ConvertX",
      "description": "Provide a value for ACCOUNT_REGISTRATION.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "ALLOW_UNAUTHENTICATED",
      "service": "ConvertX",
      "description": "Provide a value for ALLOW_UNAUTHENTICATED.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "convertx-file-converter"
      }
    },
    "cli": "railway deploy --template convertx-file-converter",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "de3d421e-926f-41d1-9bab-9518f9ca30e9",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "25dd467a-bee9-467f-81f3-a51891e6e661": {
                  "icon": null,
                  "name": "ConvertX 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": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "8080"
                    },
                    "UPSTREAM": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{ConvertX.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "GATEWAY_CONFIG": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": ":8080 {\n  handle /healthz {\n    rewrite * /healthcheck\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    }\n  }\n}"
                    },
                    "GATEWAY_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated public converter gateway password.",
                      "defaultValue": "{{GATEWAY_PASSWORD}}"
                    },
                    "GATEWAY_USERNAME": {
                      "isOptional": false,
                      "description": "Public converter gateway username.",
                      "defaultValue": "convertx"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8080
                      }
                    }
                  }
                },
                "75d37272-935b-497b-bc77-07fb43609842": {
                  "icon": null,
                  "name": "ConvertX",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthcheck",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/c4illin/convertx:v0.18.0@sha256:b515b04bfd25298a5cdc775b2fcd48b9399bab658ce13e2598b65df1b16098c8"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "3000"
                    },
                    "JWT_SECRET": {
                      "isOptional": false,
                      "description": "Generated session-signing secret.",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "MAX_CONVERT_PROCESS": {
                      "isOptional": false,
                      "description": "Maximum parallel conversion processes.",
                      "defaultValue": "2"
                    },
                    "ACCOUNT_REGISTRATION": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "false"
                    },
                    "ALLOW_UNAUTHENTICATED": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "false"
                    }
                  },
                  "volumeMounts": {
                    "75d37272-935b-497b-bc77-07fb43609842": {
                      "sizeMB": 5000,
                      "mountPath": "/app/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "ConvertX Gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-10T19:22:16.118Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_763db4996f364f468f40",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 149,
    "typical_build_seconds": 0,
    "typical_start_seconds": 15,
    "slowest_service": "ConvertX Gateway"
  }
}
