{
  "manifest_version": "1.0.0",
  "template": {
    "id": "11ec5910-eaeb-475c-ae59-1d933ca5b0b3",
    "slug": "erpnext-v16",
    "name": "ERPNext v16",
    "description": "Deploy and Host ERPNext with Railway",
    "url": "https://railway.com/deploy/erpnext-v16",
    "upstream": {
      "repo_url": "https://github.com/thspacecode/erpnext-docker"
    }
  },
  "services": [
    {
      "name": "redis-queue",
      "source": {
        "image": "redis:6.2-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "redis-cache",
      "source": {
        "image": "redis:6.2-alpine"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "mariadb",
      "source": {
        "image": "mariadb:11.8"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "erpnext-docker",
      "source": {
        "repo": "https://github.com/thspacecode/erpnext-docker"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/frappe/frappe-bench/sites",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MARIADB_ROOT_PASSWORD",
      "service": "mariadb",
      "description": "[Removable after initial site setup]",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "FRAPPE_DB_HOST",
      "service": "erpnext-docker",
      "description": "Database server host that Frappe connects to.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RFP_DOMAIN_NAME",
      "service": "erpnext-docker",
      "description": "Public domain name, will be use to create Frappe/ERPNext site and configure Nginx. Change to custom domain name if need. Sample value: your-erp-site.com",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "FRAPPE_DB_PASSWORD",
      "service": "erpnext-docker",
      "description": "[Removable after initial site setup]",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "FRAPPE_REDIS_CACHE",
      "service": "erpnext-docker",
      "description": "Redis endpoint used for caching in Frappe.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "FRAPPE_REDIS_QUEUE",
      "service": "erpnext-docker",
      "description": "Redis endpoint used for background job queues in Frappe.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RFP_SITE_ADMIN_PASSWORD",
      "service": "erpnext-docker",
      "description": "[Removable after initial site setup]",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "erpnext-docker",
      "description": "Extend healthcheck timeout for initial setup to 15 mins, recommend to remove this variable after setup.",
      "secret": false,
      "strategy": "default",
      "default": "900"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "erpnext-v16"
      }
    },
    "cli": "railway deploy --template erpnext-v16",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "11ec5910-eaeb-475c-ae59-1d933ca5b0b3",
            "serializedConfig": {
              "services": {
                "3a45a7c5-c0d0-4a41-b792-29187bd9f156": {
                  "icon": "https://cdn.svglogos.dev/logos/redis.svg",
                  "name": "redis-queue",
                  "source": {
                    "image": "redis:6.2-alpine"
                  },
                  "volumeMounts": {
                    "3a45a7c5-c0d0-4a41-b792-29187bd9f156": {
                      "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."
                  }
                },
                "7165be08-55a5-47c1-8bc4-ee70ed850d48": {
                  "icon": "https://cdn.svglogos.dev/logos/redis.svg",
                  "name": "redis-cache",
                  "source": {
                    "image": "redis:6.2-alpine"
                  },
                  "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."
                  }
                },
                "e31d7938-2819-4f64-82f8-331031fcb387": {
                  "icon": "https://cdn.svgporn.com/logos/mariadb-icon.svg",
                  "name": "mariadb",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --skip-character-set-client-handshake --skip-innodb-read-only-compressed"
                  },
                  "source": {
                    "image": "mariadb:11.8"
                  },
                  "variables": {
                    "MARIADB_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "[Removable after initial site setup]",
                      "defaultValue": "{{MARIADB_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "e31d7938-2819-4f64-82f8-331031fcb387": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                },
                "f51d8787-a38b-451d-9a69-b6e77f56fa67": {
                  "icon": "https://github.com/frappe/erpnext/raw/develop/erpnext/public/images/v16/erpnext.svg",
                  "name": "erpnext-docker",
                  "deploy": {
                    "healthcheckPath": ""
                  },
                  "source": {
                    "repo": "thspacecode/erpnext-docker",
                    "branch": null,
                    "rootDirectory": "/setup-railway-separated"
                  },
                  "variables": {
                    "FRAPPE_DB_HOST": {
                      "isOptional": false,
                      "description": "Database server host that Frappe connects to.",
                      "defaultValue": "${{mariadb.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "RFP_DOMAIN_NAME": {
                      "isOptional": false,
                      "description": "Public domain name, will be use to create Frappe/ERPNext site and configure Nginx. Change to custom domain name if need. Sample value: your-erp-site.com",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "FRAPPE_DB_PASSWORD": {
                      "isOptional": false,
                      "description": "[Removable after initial site setup]",
                      "defaultValue": "${{mariadb.MARIADB_ROOT_PASSWORD}}"
                    },
                    "FRAPPE_REDIS_CACHE": {
                      "isOptional": false,
                      "description": "Redis endpoint used for caching in Frappe.",
                      "defaultValue": "redis://${{redis-cache.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "FRAPPE_REDIS_QUEUE": {
                      "isOptional": false,
                      "description": "Redis endpoint used for background job queues in Frappe.",
                      "defaultValue": "redis://${{redis-queue.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "RFP_SITE_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "[Removable after initial site setup]",
                      "defaultValue": "{{RFP_SITE_ADMIN_PASSWORD}}"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "Extend healthcheck timeout for initial setup to 15 mins, recommend to remove this variable after setup.",
                      "defaultValue": "900"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  },
                  "volumeMounts": {
                    "f51d8787-a38b-451d-9a69-b6e77f56fa67": {
                      "mountPath": "/home/frappe/frappe-bench/sites"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T13:18:17.751Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_86889c154cc045d19866",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 237,
    "typical_build_seconds": 134,
    "typical_start_seconds": 41,
    "slowest_service": "erpnext-docker"
  }
}
