{
  "manifest_version": "1.0.0",
  "template": {
    "id": "94bc1810-6005-4968-aa88-bf8487e802a6",
    "slug": "erpnext-v16-business-suite",
    "name": "ERPNext v16 Business Suite",
    "description": "Accounting, inventory, sales and CRM in one ERP with workers and scheduler.",
    "url": "https://railway.com/deploy/erpnext-v16-business-suite",
    "upstream": {
      "repo_url": "https://github.com/baranberkay96/erpnext-railway"
    }
  },
  "services": [
    {
      "name": "redis-queue",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "redis-cache",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "ERPNext",
      "source": {
        "repo": "https://github.com/baranberkay96/erpnext-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/frappe/frappe-bench/sites",
      "http": true
    },
    {
      "name": "MariaDB",
      "source": {
        "image": "mariadb:11.8.9"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "REDISHOST",
      "service": "redis-queue",
      "description": "Private network hostname of the Redis service, only resolvable from services in the same environment.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "redis-queue",
      "description": "Port that Redis listens on.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "redis-queue",
      "description": "Username for authenticating with Redis.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "redis-queue",
      "description": "Connection string for connecting to Redis using the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "redis-queue",
      "description": "Alias of REDIS_PASSWORD for clients that expect the unseparated name.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "redis-queue",
      "description": "Randomly generated password for authenticating with Redis.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDISHOST",
      "service": "redis-cache",
      "description": "Private hostname (cache only: no persistence, LRU eviction at 256 MB).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "redis-cache",
      "description": "Port that Redis listens on.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "redis-cache",
      "description": "Username for authenticating with Redis.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "redis-cache",
      "description": "Connection string for connecting to Redis using the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "redis-cache",
      "description": "Alias of REDIS_PASSWORD for clients that expect the unseparated name.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "redis-cache",
      "description": "Randomly generated password for authenticating with Redis.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "ERPNext",
      "description": "Port nginx listens on inside the container (public domain target).",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "DB_HOST",
      "service": "ERPNext",
      "description": "MariaDB host (private network).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_PORT",
      "service": "ERPNext",
      "description": "MariaDB port.",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "SITE_NAME",
      "service": "ERPNext",
      "description": "Internal Frappe site name. Fixed on purpose: every domain pointed at this service serves this site. Must not equal an app name; do not change after first boot.",
      "secret": false,
      "strategy": "default",
      "default": "erpnext.local"
    },
    {
      "key": "PUBLIC_URL",
      "service": "ERPNext",
      "description": "Public URL written to the site's host_name (links in e-mails, prints, background jobs). Update it with a custom domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "AUTO_MIGRATE",
      "service": "ERPNext",
      "description": "Run 'bench --site all migrate' automatically once after the image version changes.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "ERPNext",
      "description": "Password of the 'Administrator' user, used once when the site is created. Change it later inside ERPNext.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_CACHE_URL",
      "service": "ERPNext",
      "description": "Redis for Frappe's cache.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_QUEUE_URL",
      "service": "ERPNext",
      "description": "Redis for background job queues and socket.io pub/sub.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_ROOT_PASSWORD",
      "service": "ERPNext",
      "description": "MariaDB root password, used to create the site database and its user.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GUNICORN_THREADS",
      "service": "ERPNext",
      "description": "Threads per Gunicorn worker.",
      "secret": false,
      "strategy": "default",
      "default": "4"
    },
    {
      "key": "GUNICORN_TIMEOUT",
      "service": "ERPNext",
      "description": "Seconds before a web request is killed.",
      "secret": false,
      "strategy": "default",
      "default": "120"
    },
    {
      "key": "GUNICORN_WORKERS",
      "service": "ERPNext",
      "description": "Gunicorn worker processes (web requests).",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "WORKER_LONG_PROCS",
      "service": "ERPNext",
      "description": "Background worker processes for the long queue (imports, reposting, heavy reports).",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PROXY_READ_TIMEOUT",
      "service": "ERPNext",
      "description": "nginx timeout (s) for slow reports and print formats.",
      "secret": false,
      "strategy": "default",
      "default": "120"
    },
    {
      "key": "WORKER_SHORT_PROCS",
      "service": "ERPNext",
      "description": "Background worker processes for the short/default queues.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "CLIENT_MAX_BODY_SIZE",
      "service": "ERPNext",
      "description": "Max upload size accepted by nginx.",
      "secret": false,
      "strategy": "default",
      "default": "50m"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "ERPNext",
      "description": "Give running background jobs time to finish on redeploy.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "MARIADBHOST",
      "service": "MariaDB",
      "description": "Private hostname.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MARIADBPORT",
      "service": "MariaDB",
      "description": "Port.",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MARIADB_AUTO_UPGRADE",
      "service": "MariaDB",
      "description": "Run mariadb-upgrade automatically after an image upgrade.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "MARIADB_ROOT_PASSWORD",
      "service": "MariaDB",
      "description": "Root password (generated).",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MARIADB_INNODB_BUFFER_POOL_SIZE",
      "service": "MariaDB",
      "description": "InnoDB buffer pool (main memory knob). Raise it as the database grows.",
      "secret": false,
      "strategy": "default",
      "default": "512M"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "MariaDB",
      "description": "Allow MariaDB to shut down cleanly.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "erpnext-v16-business-suite"
      }
    },
    "cli": "railway deploy --template erpnext-v16-business-suite",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "94bc1810-6005-4968-aa88-bf8487e802a6",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "5264c09e-3416-5f03-8bcc-3b2cfa9f61a6": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "redis-queue",
                  "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\"",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": true,
                      "description": "Private network hostname of the Redis service, only resolvable from services in the same environment.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": true,
                      "description": "Port that Redis listens on.",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": true,
                      "description": "Username for authenticating with Redis.",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": true,
                      "description": "Connection string for connecting to Redis using the private network.",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": true,
                      "description": "Alias of REDIS_PASSWORD for clients that expect the unseparated name.",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": true,
                      "description": "Randomly generated password for authenticating with Redis.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "b53b6446-e5ab-5b98-82dd-9402c176a05c": {
                      "mountPath": "/data"
                    }
                  }
                },
                "ac55109f-d145-56f9-b051-639e0f4c0d54": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "redis-cache",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save '' --appendonly no --maxmemory 256mb --maxmemory-policy allkeys-lru\"",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": true,
                      "description": "Private hostname (cache only: no persistence, LRU eviction at 256 MB).",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": true,
                      "description": "Port that Redis listens on.",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": true,
                      "description": "Username for authenticating with Redis.",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": true,
                      "description": "Connection string for connecting to Redis using the private network.",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": true,
                      "description": "Alias of REDIS_PASSWORD for clients that expect the unseparated name.",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": true,
                      "description": "Randomly generated password for authenticating with Redis.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  }
                },
                "c238d575-cab0-59fb-a0fa-1c82992cf78b": {
                  "icon": "https://raw.githubusercontent.com/frappe/erpnext/version-16/erpnext/public/images/erpnext-logo.svg",
                  "name": "ERPNext",
                  "build": {
                    "builder": "DOCKERFILE"
                  },
                  "deploy": {
                    "healthcheckPath": "/api/method/ping",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 1200,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "baranberkay96/erpnext-railway",
                    "branch": "main",
                    "rootDirectory": "/services/erpnext"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "Port nginx listens on inside the container (public domain target).",
                      "defaultValue": "8080"
                    },
                    "DB_HOST": {
                      "isOptional": true,
                      "description": "MariaDB host (private network).",
                      "defaultValue": "${{MariaDB.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_PORT": {
                      "isOptional": true,
                      "description": "MariaDB port.",
                      "defaultValue": "3306"
                    },
                    "SITE_NAME": {
                      "isOptional": true,
                      "description": "Internal Frappe site name. Fixed on purpose: every domain pointed at this service serves this site. Must not equal an app name; do not change after first boot.",
                      "defaultValue": "erpnext.local"
                    },
                    "PUBLIC_URL": {
                      "isOptional": true,
                      "description": "Public URL written to the site's host_name (links in e-mails, prints, background jobs). Update it with a custom domain.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "AUTO_MIGRATE": {
                      "isOptional": true,
                      "description": "Run 'bench --site all migrate' automatically once after the image version changes.",
                      "defaultValue": "true"
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": true,
                      "description": "Password of the 'Administrator' user, used once when the site is created. Change it later inside ERPNext.",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "REDIS_CACHE_URL": {
                      "isOptional": true,
                      "description": "Redis for Frappe's cache.",
                      "defaultValue": "${{redis-cache.REDIS_URL}}"
                    },
                    "REDIS_QUEUE_URL": {
                      "isOptional": true,
                      "description": "Redis for background job queues and socket.io pub/sub.",
                      "defaultValue": "${{redis-queue.REDIS_URL}}"
                    },
                    "DB_ROOT_PASSWORD": {
                      "isOptional": true,
                      "description": "MariaDB root password, used to create the site database and its user.",
                      "defaultValue": "${{MariaDB.MARIADB_ROOT_PASSWORD}}"
                    },
                    "GUNICORN_THREADS": {
                      "isOptional": true,
                      "description": "Threads per Gunicorn worker.",
                      "defaultValue": "4"
                    },
                    "GUNICORN_TIMEOUT": {
                      "isOptional": true,
                      "description": "Seconds before a web request is killed.",
                      "defaultValue": "120"
                    },
                    "GUNICORN_WORKERS": {
                      "isOptional": true,
                      "description": "Gunicorn worker processes (web requests).",
                      "defaultValue": "2"
                    },
                    "WORKER_LONG_PROCS": {
                      "isOptional": true,
                      "description": "Background worker processes for the long queue (imports, reposting, heavy reports).",
                      "defaultValue": "1"
                    },
                    "PROXY_READ_TIMEOUT": {
                      "isOptional": true,
                      "description": "nginx timeout (s) for slow reports and print formats.",
                      "defaultValue": "120"
                    },
                    "WORKER_SHORT_PROCS": {
                      "isOptional": true,
                      "description": "Background worker processes for the short/default queues.",
                      "defaultValue": "1"
                    },
                    "CLIENT_MAX_BODY_SIZE": {
                      "isOptional": true,
                      "description": "Max upload size accepted by nginx.",
                      "defaultValue": "50m"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Give running background jobs time to finish on redeploy.",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "1ee77bcd-2ea6-56db-8f16-4403e77c1ad1": {
                      "mountPath": "/home/frappe/frappe-bench/sites"
                    }
                  }
                },
                "dd55ab54-c22e-5796-856c-3a3cefce4847": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mariadb.svg",
                  "name": "MariaDB",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf /var/lib/mysql/lost+found && exec docker-entrypoint.sh mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --skip-character-set-client-handshake '--bind-address=*' --innodb-buffer-pool-size=$MARIADB_INNODB_BUFFER_POOL_SIZE\"",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mariadb:11.8.9"
                  },
                  "variables": {
                    "MARIADBHOST": {
                      "isOptional": true,
                      "description": "Private hostname.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MARIADBPORT": {
                      "isOptional": true,
                      "description": "Port.",
                      "defaultValue": "3306"
                    },
                    "MARIADB_AUTO_UPGRADE": {
                      "isOptional": true,
                      "description": "Run mariadb-upgrade automatically after an image upgrade.",
                      "defaultValue": "1"
                    },
                    "MARIADB_ROOT_PASSWORD": {
                      "isOptional": true,
                      "description": "Root password (generated).",
                      "defaultValue": "{{MARIADB_ROOT_PASSWORD}}"
                    },
                    "MARIADB_INNODB_BUFFER_POOL_SIZE": {
                      "isOptional": true,
                      "description": "InnoDB buffer pool (main memory knob). Raise it as the database grows.",
                      "defaultValue": "512M"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Allow MariaDB to shut down cleanly.",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "f3a1f00e-f54d-5433-8cef-7097f17e4e28": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "ERPNext",
      "method": "GET",
      "path": "/api/method/ping",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-10-11T16:14:40.554Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-11T14:48:14.503Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_e0f6f52646f44a1f8a63",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 381,
    "typical_build_seconds": 161,
    "typical_start_seconds": 181,
    "slowest_service": "ERPNext"
  }
}
