{
  "manifest_version": "1.0.0",
  "template": {
    "id": "2ecc98ac-b343-421f-a46b-978170c0b3e3",
    "slug": "opengym",
    "name": "openGym",
    "description": "Self-hosted gym tracker with passkeys: routines, workouts, muscle map.",
    "url": "https://railway.com/deploy/opengym",
    "upstream": {
      "image": "ghcr.io/youssefsiam38/opengym-railway:1.0.1"
    }
  },
  "services": [
    {
      "name": "opengym",
      "source": {
        "image": "ghcr.io/youssefsiam38/opengym-railway:1.0.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/storage",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "opengym",
      "description": "Port Railway routes traffic and health checks to (nginx). Keep it 8080.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "RP_ID",
      "service": "opengym",
      "description": "Hostname passkeys are bound to. Must be the domain you open the app on; set it (and ORIGIN) when you add a custom domain, then redeploy.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ORIGIN",
      "service": "opengym",
      "description": "Full https URL the app is served from. Keep it in step with RP_ID.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RP_NAME",
      "service": "opengym",
      "description": "Name shown in the passkey prompt.",
      "secret": false,
      "strategy": "default",
      "default": "openGym"
    },
    {
      "key": "OWNER_NAME",
      "service": "opengym",
      "description": "Profile name of the admin created on first boot. Sign in with this name and OWNER_PASSWORD.",
      "secret": false,
      "strategy": "default",
      "default": "Owner"
    },
    {
      "key": "ALLOW_GUEST",
      "service": "opengym",
      "description": "0 hides 'Continue without account'. Set 1 to offer browser-only guest mode.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "INVITE_ONLY",
      "service": "opengym",
      "description": "1 = new profiles need an invite code from the admin dashboard. Keep it on for a public URL.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "TRUST_PROXY",
      "service": "opengym",
      "description": "Let the sign-in throttle read the visitor address nginx passes on. Keep 1.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "EXERCISE_MEDIA",
      "service": "opengym",
      "description": "download = fetch exercise images/animations (~140 MB, third-party content) on first start; off = skip.",
      "secret": false,
      "strategy": "default",
      "default": "download"
    },
    {
      "key": "OWNER_PASSWORD",
      "service": "opengym",
      "description": "Password of the first-boot admin, generated. Only used on the very first start; change it later in Settings.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PASSWORD_LOGIN",
      "service": "opengym",
      "description": "1 = name + password sign-in next to passkeys. The seeded owner needs it until they add a passkey.",
      "secret": true,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "opengym",
      "description": "Room for the first start.",
      "secret": false,
      "strategy": "default",
      "default": "120"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "opengym"
      }
    },
    "cli": "railway deploy --template opengym",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "2ecc98ac-b343-421f-a46b-978170c0b3e3",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3f7622b8-5805-4df3-bcf6-a7a21b53fc31": {
                  "icon": null,
                  "name": "opengym",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/youssefsiam38/opengym-railway:1.0.1"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes traffic and health checks to (nginx). Keep it 8080.",
                      "defaultValue": "8080"
                    },
                    "RP_ID": {
                      "isOptional": false,
                      "description": "Hostname passkeys are bound to. Must be the domain you open the app on; set it (and ORIGIN) when you add a custom domain, then redeploy.",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "ORIGIN": {
                      "isOptional": false,
                      "description": "Full https URL the app is served from. Keep it in step with RP_ID.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "RP_NAME": {
                      "isOptional": false,
                      "description": "Name shown in the passkey prompt.",
                      "defaultValue": "openGym"
                    },
                    "AUDIT_IP": {
                      "isOptional": true,
                      "description": "Record visitor addresses in the activity log: off (default), net or full."
                    },
                    "OWNER_NAME": {
                      "isOptional": false,
                      "description": "Profile name of the admin created on first boot. Sign in with this name and OWNER_PASSWORD.",
                      "defaultValue": "Owner"
                    },
                    "ALLOW_GUEST": {
                      "isOptional": false,
                      "description": "0 hides 'Continue without account'. Set 1 to offer browser-only guest mode.",
                      "defaultValue": "0"
                    },
                    "INVITE_ONLY": {
                      "isOptional": false,
                      "description": "1 = new profiles need an invite code from the admin dashboard. Keep it on for a public URL.",
                      "defaultValue": "1"
                    },
                    "TRUST_PROXY": {
                      "isOptional": false,
                      "description": "Let the sign-in throttle read the visitor address nginx passes on. Keep 1.",
                      "defaultValue": "1"
                    },
                    "DEFAULT_LANG": {
                      "isOptional": true,
                      "description": "Default language for the sign-in screen and new profiles (en, de, es, fr, pt-BR, ...)."
                    },
                    "SESSION_DAYS": {
                      "isOptional": true,
                      "description": "How long a sign-in lasts, in days (default 90)."
                    },
                    "VAPID_SUBJECT": {
                      "isOptional": true,
                      "description": "Contact for push services, e.g. mailto:you@example.com (default: ORIGIN)."
                    },
                    "COACH_DISABLED": {
                      "isOptional": true,
                      "description": "1 forces the optional AI coach off instance-wide."
                    },
                    "EXERCISE_MEDIA": {
                      "isOptional": false,
                      "description": "download = fetch exercise images/animations (~140 MB, third-party content) on first start; off = skip.",
                      "defaultValue": "download"
                    },
                    "OWNER_PASSWORD": {
                      "isOptional": false,
                      "description": "Password of the first-boot admin, generated. Only used on the very first start; change it later in Settings.",
                      "defaultValue": "{{OWNER_PASSWORD}}"
                    },
                    "PASSWORD_LOGIN": {
                      "isOptional": false,
                      "description": "1 = name + password sign-in next to passkeys. The seeded owner needs it until they add a passkey.",
                      "defaultValue": "1"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "Room for the first start.",
                      "defaultValue": "120"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "3f7622b8-5805-4df3-bcf6-a7a21b53fc31": {
                      "mountPath": "/storage"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "opengym",
      "method": "GET",
      "path": "/api/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-04T22:14:51.474Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-04T19:05:45.290Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_481f03942f0544a39451",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 27,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "opengym"
  }
}
