{
  "manifest_version": "1.0.0",
  "template": {
    "id": "bb00a82f-00f8-4c08-bd0b-40905633267e",
    "slug": "trailbase-or-just-updated-rust-firebase-",
    "name": "TrailBase | (Just Updated) Rust Firebase Alternative, Admin Login Set From Boot, Data Survives Redeploys",
    "description": "TrailBase backend, admin login set from boot, data on a volume",
    "url": "https://railway.com/deploy/trailbase-or-just-updated-rust-firebase-",
    "upstream": {
      "image": "trailbase/trailbase:0.34.4@sha256:ccf9179006e13f0f4c7816a01d3420042af5de050e0c0214c5261420888f2785"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "trailbase",
      "source": {
        "image": "trailbase/trailbase:0.34.4@sha256:ccf9179006e13f0f4c7816a01d3420042af5de050e0c0214c5261420888f2785"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/traildepot",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PUBLIC_URL",
      "service": "trailbase",
      "description": "Provide a value for PUBLIC_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "trailbase",
      "description": "Provide a value for RAILWAY_RUN_UID.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "TRAILBASE_PRIVATE_URL",
      "service": "trailbase",
      "description": "Provide a value for TRAILBASE_PRIVATE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "TRAILBASE_ADMIN_PASSWORD",
      "service": "trailbase",
      "description": "Provide a value for TRAILBASE_ADMIN_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "trailbase-or-just-updated-rust-firebase-"
      }
    },
    "cli": "railway deploy --template trailbase-or-just-updated-rust-firebase-",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "bb00a82f-00f8-4c08-bd0b-40905633267e",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "021f023b-62e0-487b-91a0-d1473e993786": {
                  "icon": null,
                  "name": "trailbase",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'set -e; D=/app/traildepot; mkdir -p \"$D\"; if [ -z \"$TRAILBASE_ADMIN_PASSWORD\" ]; then echo \"FATAL: TRAILBASE_ADMIN_PASSWORD must be set before TrailBase will start\"; exit 1; fi; if [ \"$(stat -c %u \"$D\")\" != 1000 ]; then chown -R 1000:1000 \"$D\"; fi; echo \"[railway] trailbase port=${PORT:-4000} depot_owner=$(stat -c %u:%g \"$D\") writable=$(su -s /bin/sh trailbase -c \"test -w $D\" && echo yes || echo NO)\"; exec su -s /bin/sh trailbase -c '\\''T=\"/app/trail --depot /app/traildepot\"; L=/app/traildepot/.railway-init.log; $T run --address 127.0.0.1:4999 >$L 2>&1 & P=$!; for i in $(seq 1 90); do curl -sf http://127.0.0.1:4999/api/healthcheck >/dev/null 2>&1 && break; sleep 1; done; if $T user change-password admin@localhost \"$TRAILBASE_ADMIN_PASSWORD\" >/dev/null 2>&1; then echo \"[railway] admin@localhost password set from TRAILBASE_ADMIN_PASSWORD\"; else echo \"[railway] admin@localhost not found (already replaced), password left alone\"; fi; kill $P; wait $P 2>/dev/null || true; exec $T run --address \"0.0.0.0:${PORT:-4000}\"'\\'''",
                    "healthcheckPath": "/api/healthcheck",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "trailbase/trailbase:0.34.4@sha256:ccf9179006e13f0f4c7816a01d3420042af5de050e0c0214c5261420888f2785"
                  },
                  "variables": {
                    "PUBLIC_URL": {
                      "isOptional": false,
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "defaultValue": "{{RAILWAY_RUN_UID}}"
                    },
                    "TRAILBASE_PRIVATE_URL": {
                      "isOptional": false,
                      "defaultValue": "http://${{RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "TRAILBASE_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{TRAILBASE_ADMIN_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "021f023b-62e0-487b-91a0-d1473e993786": {
                      "mountPath": "/app/traildepot"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "trailbase",
      "method": "GET",
      "path": "/api/healthcheck",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-09T22:14:42.294Z",
  "generator_version": "0.1.0"
}
