{
  "manifest_version": "1.0.0",
  "template": {
    "id": "8fd922f5-864c-489a-b1ce-1703b9bce79c",
    "slug": "ezbookkeeping-finance",
    "name": "ezBookkeeping finance",
    "description": "",
    "url": "https://railway.com/deploy/ezbookkeeping-finance",
    "upstream": {
      "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
    }
  },
  "services": [
    {
      "name": "ezBookkeeping",
      "source": {
        "image": "mayswind/ezbookkeeping:1.6.1@sha256:6d71a0d0f62806f609634886d0cbe9133e8177e1cb76b569d8dcc0587f734f0a"
      },
      "needs_volume": true,
      "volume_mount_path": "/ezbookkeeping/data",
      "http": false
    },
    {
      "name": "ezBookkeeping Gateway",
      "source": {
        "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "ezBookkeeping",
      "description": "Private application listener.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "EBK_LOG_MODE",
      "service": "ezBookkeeping",
      "description": "Writes application logs to Railway.",
      "secret": false,
      "strategy": "default",
      "default": "console"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "ezBookkeeping",
      "description": "Allows the start command to fix only volume ownership before dropping privileges.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "EBK_SERVER_DOMAIN",
      "service": "ezBookkeeping",
      "description": "Public gateway domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "EBK_SERVER_PROTOCOL",
      "service": "ezBookkeeping",
      "description": "Private HTTP listener behind the HTTPS gateway.",
      "secret": false,
      "strategy": "default",
      "default": "http"
    },
    {
      "key": "EBK_SERVER_ROOT_URL",
      "service": "ezBookkeeping",
      "description": "Canonical public HTTPS application URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "EBK_DATABASE_DB_PATH",
      "service": "ezBookkeeping",
      "description": "SQLite database path beneath the persistent volume.",
      "secret": false,
      "strategy": "default",
      "default": "/ezbookkeeping/data/ezbookkeeping.db"
    },
    {
      "key": "EBK_SERVER_HTTP_PORT",
      "service": "ezBookkeeping",
      "description": "ezBookkeeping HTTP listener.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "EBK_SECURITY_SECRET_KEY",
      "service": "ezBookkeeping",
      "description": "Generated token and session signing secret.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "EBK_AUTH_ENABLE_REGISTER",
      "service": "ezBookkeeping",
      "description": "Keeps registration available only through the protected gateway route.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "EBK_STORAGE_LOCAL_FILESYSTEM_PATH",
      "service": "ezBookkeeping",
      "description": "Uploaded-file path beneath the persistent volume.",
      "secret": false,
      "strategy": "default",
      "default": "/ezbookkeeping/data"
    },
    {
      "key": "PORT",
      "service": "ezBookkeeping Gateway",
      "description": "Public gateway listener.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "UPSTREAM",
      "service": "ezBookkeeping Gateway",
      "description": "Private ezBookkeeping endpoint.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GATEWAY_CONFIG",
      "service": "ezBookkeeping Gateway",
      "description": "Fixed registration-only authentication policy.",
      "secret": false,
      "strategy": "default",
      "default": ":8080 {\n  handle /healthz {\n    rewrite * /healthz.json\n    reverse_proxy http://__UPSTREAM__\n  }\n  @registration path /api/register.json\n  basic_auth @registration {\n    __USERNAME__ __PASSWORD_HASH__\n  }\n  handle {\n    reverse_proxy http://__UPSTREAM__\n  }\n}"
    },
    {
      "key": "SETUP_PASSWORD",
      "service": "ezBookkeeping Gateway",
      "description": "Generated registration-gateway password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SETUP_USERNAME",
      "service": "ezBookkeeping Gateway",
      "description": "Registration-gateway username.",
      "secret": false,
      "strategy": "default",
      "default": "ezbookkeeping"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "ezbookkeeping-finance"
      }
    },
    "cli": "railway deploy --template ezbookkeeping-finance",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "8fd922f5-864c-489a-b1ce-1703b9bce79c",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "c8e3b9b0-0913-41b1-9a8a-530b08a48230": {
                  "icon": null,
                  "name": "ezBookkeeping",
                  "deploy": {
                    "startCommand": "/bin/sh -ec 'chown 1000:1000 /ezbookkeeping/data; exec su -s /bin/sh ezbookkeeping -c \"exec /docker-entrypoint.sh\"'",
                    "healthcheckPath": "/healthz.json",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mayswind/ezbookkeeping:1.6.1@sha256:6d71a0d0f62806f609634886d0cbe9133e8177e1cb76b569d8dcc0587f734f0a"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Private application listener.",
                      "defaultValue": "8080"
                    },
                    "EBK_LOG_MODE": {
                      "isOptional": false,
                      "description": "Writes application logs to Railway.",
                      "defaultValue": "console"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Allows the start command to fix only volume ownership before dropping privileges.",
                      "defaultValue": "0"
                    },
                    "EBK_SERVER_DOMAIN": {
                      "isOptional": false,
                      "description": "Public gateway domain.",
                      "defaultValue": "${{ezBookkeeping Gateway.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "EBK_SERVER_PROTOCOL": {
                      "isOptional": false,
                      "description": "Private HTTP listener behind the HTTPS gateway.",
                      "defaultValue": "http"
                    },
                    "EBK_SERVER_ROOT_URL": {
                      "isOptional": false,
                      "description": "Canonical public HTTPS application URL.",
                      "defaultValue": "https://${{ezBookkeeping Gateway.RAILWAY_PUBLIC_DOMAIN}}/"
                    },
                    "EBK_DATABASE_DB_PATH": {
                      "isOptional": false,
                      "description": "SQLite database path beneath the persistent volume.",
                      "defaultValue": "/ezbookkeeping/data/ezbookkeeping.db"
                    },
                    "EBK_SERVER_HTTP_PORT": {
                      "isOptional": false,
                      "description": "ezBookkeeping HTTP listener.",
                      "defaultValue": "8080"
                    },
                    "EBK_SECURITY_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Generated token and session signing secret.",
                      "defaultValue": "{{EBK_SECURITY_SECRET_KEY}}"
                    },
                    "EBK_AUTH_ENABLE_REGISTER": {
                      "isOptional": false,
                      "description": "Keeps registration available only through the protected gateway route.",
                      "defaultValue": "true"
                    },
                    "EBK_STORAGE_LOCAL_FILESYSTEM_PATH": {
                      "isOptional": false,
                      "description": "Uploaded-file path beneath the persistent volume.",
                      "defaultValue": "/ezbookkeeping/data"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "c8e3b9b0-0913-41b1-9a8a-530b08a48230": {
                      "sizeMB": 5000,
                      "mountPath": "/ezbookkeeping/data"
                    }
                  }
                },
                "d833d3cf-ed05-4ec1-a393-341a4a1869a4": {
                  "icon": null,
                  "name": "ezBookkeeping Gateway",
                  "deploy": {
                    "startCommand": "/bin/sh -ec 'password_hash=\"$(caddy hash-password --plaintext \"$SETUP_PASSWORD\")\"; printf \"%s\\n\" \"$GATEWAY_CONFIG\" | sed -e \"s|__USERNAME__|$SETUP_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": "Public gateway listener.",
                      "defaultValue": "8080"
                    },
                    "UPSTREAM": {
                      "isOptional": false,
                      "description": "Private ezBookkeeping endpoint.",
                      "defaultValue": "${{ezBookkeeping.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "GATEWAY_CONFIG": {
                      "isOptional": false,
                      "description": "Fixed registration-only authentication policy.",
                      "defaultValue": ":8080 {\n  handle /healthz {\n    rewrite * /healthz.json\n    reverse_proxy http://__UPSTREAM__\n  }\n  @registration path /api/register.json\n  basic_auth @registration {\n    __USERNAME__ __PASSWORD_HASH__\n  }\n  handle {\n    reverse_proxy http://__UPSTREAM__\n  }\n}"
                    },
                    "SETUP_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated registration-gateway password.",
                      "defaultValue": "{{SETUP_PASSWORD}}"
                    },
                    "SETUP_USERNAME": {
                      "isOptional": false,
                      "description": "Registration-gateway username.",
                      "defaultValue": "ezbookkeeping"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "ezBookkeeping Gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T10:14:45.332Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-04T18:38:14.092Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_1007dc3226ee49f68bfe",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 202,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "ezBookkeeping"
  }
}
