{
  "manifest_version": "1.0.0",
  "template": {
    "id": "010cc4a4-d5df-4f02-baff-e546ed4b787f",
    "slug": "gitterm",
    "name": "Gitterm",
    "description": "Run Opencode Anytime, Anywhere, on Any Cloud",
    "url": "https://railway.com/deploy/gitterm",
    "upstream": {
      "image": "ghcr.io/opeoginni/gitterm-proxy"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "gitterm-server",
      "source": {
        "image": "ghcr.io/opeoginni/gitterm-server"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "tcp_ports": [
        6379
      ],
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    },
    {
      "name": "gitterm-web",
      "source": {
        "image": "ghcr.io/opeoginni/gitterm-web"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "gitterm-listener",
      "source": {
        "image": "ghcr.io/opeoginni/gitterm-listener"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "gitterm-idle-reaper-worker",
      "source": {
        "image": "ghcr.io/opeoginni/gitterm-idle-reaper-worker"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "gitterm-caddy-proxy",
      "source": {
        "image": "ghcr.io/opeoginni/gitterm-proxy"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "API_URL",
      "service": "gitterm-server",
      "description": "Public API URL exposed through Caddy",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BASE_URL",
      "service": "gitterm-server",
      "description": "Public application origin used for redirects and generated links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "REDIS_URL",
      "service": "gitterm-server",
      "description": "Redis connection supplied by Railway",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ADMIN_EMAIL",
      "service": "gitterm-server",
      "description": "Initial administrator email; recommended required template input",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "BASE_DOMAIN",
      "service": "gitterm-server",
      "description": "Public domain without protocol or path",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CORS_ORIGIN",
      "service": "gitterm-server",
      "description": "Browser origin allowed to send authenticated requests",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "gitterm-server",
      "description": "PostgreSQL connection supplied by Railway",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LISTENER_URL",
      "service": "gitterm-server",
      "description": "Public listener URL used for agent callbacks",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ROUTING_MODE",
      "service": "gitterm-server",
      "description": "Routes workspaces through /ws/... without wildcard DNS",
      "secret": false,
      "strategy": "default",
      "default": "path"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "gitterm-server",
      "description": "Initial administrator password; must be set with ADMIN_EMAIL",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "BETTER_AUTH_URL",
      "service": "gitterm-server",
      "description": "Better Auth origin; do not append /api or /api/auth",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DEPLOYMENT_MODE",
      "service": "gitterm-server",
      "description": "Disables managed billing and quota requirements",
      "secret": false,
      "strategy": "default",
      "default": "self-hosted"
    },
    {
      "key": "INTERNAL_API_KEY",
      "service": "gitterm-server",
      "description": "Shared secret for internal service-to-service authentication",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ENABLE_EMAIL_AUTH",
      "service": "gitterm-server",
      "description": "Enables email-and-password authentication",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "WORKSPACE_API_URL",
      "service": "gitterm-server",
      "description": "Public tRPC endpoint injected into workspaces",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "gitterm-server",
      "description": "Secret used to sign and encrypt authentication sessions",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ENABLE_GITHUB_AUTH",
      "service": "gitterm-server",
      "description": "Enables GitHub OAuth when its credentials are supplied",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "ENABLE_IDLE_REAPING",
      "service": "gitterm-server",
      "description": "Automatically pauses idle workspaces",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "WORKSPACE_JWT_SECRET",
      "service": "gitterm-server",
      "description": "Secret used to sign workspace-scoped tokens",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ENCRYPTION_MASTER_KEY",
      "service": "gitterm-server",
      "description": "Persistent 32-byte hexadecimal key used to encrypt stored credentials",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ENCRYPTION_MASTER_KEY_ID",
      "service": "gitterm-server",
      "description": "Identifier for the active encryption key",
      "secret": true,
      "strategy": "default",
      "default": "primary"
    },
    {
      "key": "DEVICE_CODE_VERIFICATION_URI",
      "service": "gitterm-server",
      "description": "Page used to complete CLI device authentication",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Private Railway hostname used by services in the same project",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Internal Redis port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Default Redis ACL username",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private Redis connection string used by GitTerm services",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Compatibility alias for clients expecting REDISPASSWORD",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Automatically generated Redis password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Public connection string for external Redis access",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public URL to connect to Postgres database, used by the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "NEXT_PUBLIC_AUTH_URL",
      "service": "gitterm-web",
      "description": "Better Auth origin; do not append /api/auth",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_SERVER_URL",
      "service": "gitterm-web",
      "description": "Public API endpoint used by the web app",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_BASE_DOMAIN",
      "service": "gitterm-web",
      "description": "Public domain without protocol",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_LISTENER_URL",
      "service": "gitterm-web",
      "description": "Public real-time listener endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_ROUTING_MODE",
      "service": "gitterm-web",
      "description": "Must match the server and proxy routing mode",
      "secret": false,
      "strategy": "default",
      "default": "path"
    },
    {
      "key": "NEXT_PUBLIC_ENABLE_BILLING",
      "service": "gitterm-web",
      "description": "Disables managed billing UI",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "NEXT_PUBLIC_ENABLE_EMAIL_AUTH",
      "service": "gitterm-web",
      "description": "Keeps the email login UI synchronized with the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXT_PUBLIC_ENABLE_GITHUB_AUTH",
      "service": "gitterm-web",
      "description": "Keeps the GitHub login UI synchronized with the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SERVER_URL",
      "service": "gitterm-listener",
      "description": "Private address of the API server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "BASE_DOMAIN",
      "service": "gitterm-listener",
      "description": "Public application domain without protocol",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CORS_ORIGIN",
      "service": "gitterm-listener",
      "description": "Browser origin allowed to open subscriptions",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "gitterm-listener",
      "description": "Database used for authentication and webhook processing",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BETTER_AUTH_URL",
      "service": "gitterm-listener",
      "description": "Public Better Auth origin",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "INTERNAL_API_KEY",
      "service": "gitterm-listener",
      "description": "Shared key used for protected server procedures",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "gitterm-listener",
      "description": "Shared auth secret required to validate sessions",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GITHUB_WEBHOOK_SECRET",
      "service": "gitterm-listener",
      "description": "Optional shared GitHub webhook verification secret",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SERVER_URL",
      "service": "gitterm-idle-reaper-worker",
      "description": "Private address of the API server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DEPLOYMENT_MODE",
      "service": "gitterm-idle-reaper-worker",
      "description": "Uses self-hosted lifecycle behavior without managed quotas",
      "secret": false,
      "strategy": "default",
      "default": "self-hosted"
    },
    {
      "key": "INTERNAL_API_KEY",
      "service": "gitterm-idle-reaper-worker",
      "description": "Shared key used for workspace lifecycle procedures",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENABLE_IDLE_REAPING",
      "service": "gitterm-idle-reaper-worker",
      "description": "Controls automatic idle workspace cleanup",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WEB_URL",
      "service": "gitterm-caddy-proxy",
      "description": "Private Railway address of the web service",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SERVER_URL",
      "service": "gitterm-caddy-proxy",
      "description": "Private Railway address of the API server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "BASE_DOMAIN",
      "service": "gitterm-caddy-proxy",
      "description": "Public domain assigned to the proxy",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LISTENER_URL",
      "service": "gitterm-caddy-proxy",
      "description": "Private Railway address of the listener",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ROUTING_MODE",
      "service": "gitterm-caddy-proxy",
      "description": "Uses single-domain /ws/... workspace routing",
      "secret": false,
      "strategy": "default",
      "default": "path"
    },
    {
      "key": "INTERNAL_API_KEY",
      "service": "gitterm-caddy-proxy",
      "description": "Shared key used when Caddy calls protected server endpoints",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "gitterm"
      }
    },
    "cli": "railway deploy --template gitterm",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "010cc4a4-d5df-4f02-baff-e546ed4b787f",
            "serializedConfig": {
              "services": {
                "26358e56-f55f-4a8b-9541-7e9cf6f6b1e7": {
                  "icon": "https://devicons.railway.app/Hono",
                  "name": "gitterm-server",
                  "deploy": {},
                  "source": {
                    "image": "ghcr.io/opeoginni/gitterm-server"
                  },
                  "variables": {
                    "API_URL": {
                      "isOptional": false,
                      "description": "Public API URL exposed through Caddy",
                      "defaultValue": "https://${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}/api"
                    },
                    "BASE_URL": {
                      "description": "Public application origin used for redirects and generated links",
                      "defaultValue": "https://${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection supplied by Railway",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Initial administrator email; recommended required template input",
                      "defaultValue": "{{ADMIN_EMAIL}}"
                    },
                    "BASE_DOMAIN": {
                      "isOptional": false,
                      "description": "Public domain without protocol or path",
                      "defaultValue": "${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "CORS_ORIGIN": {
                      "isOptional": false,
                      "description": "Browser origin allowed to send authenticated requests",
                      "defaultValue": "https://${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection supplied by Railway",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "LISTENER_URL": {
                      "description": "Public listener URL used for agent callbacks",
                      "defaultValue": "https://${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}/listener"
                    },
                    "ROUTING_MODE": {
                      "isOptional": false,
                      "description": "Routes workspaces through /ws/... without wildcard DNS",
                      "defaultValue": "path"
                    },
                    "GITHUB_APP_ID": {
                      "isOptional": true,
                      "description": "Optional GitHub App ID for repository operations",
                      "defaultValue": ""
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Initial administrator password; must be set with ADMIN_EMAIL",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "BETTER_AUTH_URL": {
                      "isOptional": false,
                      "description": "Better Auth origin; do not append /api or /api/auth",
                      "defaultValue": "https://${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DEPLOYMENT_MODE": {
                      "isOptional": false,
                      "description": "Disables managed billing and quota requirements",
                      "defaultValue": "self-hosted"
                    },
                    "INTERNAL_API_KEY": {
                      "isOptional": false,
                      "description": "Shared secret for internal service-to-service authentication",
                      "defaultValue": "{{INTERNAL_API_KEY}}"
                    },
                    "ENABLE_EMAIL_AUTH": {
                      "isOptional": false,
                      "description": "Enables email-and-password authentication",
                      "defaultValue": "true"
                    },
                    "WORKSPACE_API_URL": {
                      "isOptional": false,
                      "description": "Public tRPC endpoint injected into workspaces",
                      "defaultValue": "https://${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}/api/trpc"
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Secret used to sign and encrypt authentication sessions",
                      "defaultValue": "{{BETTER_AUTH_SECRET}}"
                    },
                    "ENABLE_GITHUB_AUTH": {
                      "isOptional": false,
                      "description": "Enables GitHub OAuth when its credentials are supplied",
                      "defaultValue": "false"
                    },
                    "ENABLE_IDLE_REAPING": {
                      "description": "Automatically pauses idle workspaces",
                      "defaultValue": "true"
                    },
                    "GITHUB_APP_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Optional GitHub OAuth client ID",
                      "defaultValue": ""
                    },
                    "WORKSPACE_JWT_SECRET": {
                      "isOptional": false,
                      "description": "Secret used to sign workspace-scoped tokens",
                      "defaultValue": "{{WORKSPACE_JWT_SECRET}}"
                    },
                    "ENCRYPTION_MASTER_KEY": {
                      "isOptional": false,
                      "description": "Persistent 32-byte hexadecimal key used to encrypt stored credentials",
                      "defaultValue": "{{ENCRYPTION_MASTER_KEY}}"
                    },
                    "GITHUB_WEBHOOK_SECRET": {
                      "isOptional": true,
                      "description": "Optional secret used to verify GitHub webhooks",
                      "defaultValue": ""
                    },
                    "GITHUB_APP_PRIVATE_KEY": {
                      "isOptional": true,
                      "description": "Optional GitHub App private key; escaped newlines are supported",
                      "defaultValue": ""
                    },
                    "ENCRYPTION_MASTER_KEY_ID": {
                      "description": "Identifier for the active encryption key",
                      "defaultValue": "primary"
                    },
                    "GITHUB_APP_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "Optional GitHub OAuth client secret",
                      "defaultValue": ""
                    },
                    "WORKLOAD_IDENTITY_ISSUER": {
                      "isOptional": true,
                      "description": "Optional OIDC issuer; use https://<public-domain>/api/workload-identity when enabling Google",
                      "defaultValue": ""
                    },
                    "WORKLOAD_IDENTITY_KEY_ID": {
                      "isOptional": true,
                      "description": "Optional JWKS key ID; use gitterm-workload-identity-v1 or remove the variable for the default",
                      "defaultValue": ""
                    },
                    "DEVICE_CODE_VERIFICATION_URI": {
                      "isOptional": false,
                      "description": "Page used to complete CLI device authentication",
                      "defaultValue": "https://${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}/device"
                    },
                    "WORKLOAD_IDENTITY_PRIVATE_KEY": {
                      "isOptional": true,
                      "description": "Optional RSA PEM private key used to sign short-lived Google subject tokens",
                      "defaultValue": ""
                    }
                  },
                  "networking": {}
                },
                "3d76f851-e0f5-480a-ab7c-3f40d218b304": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "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\""
                  },
                  "source": {
                    "image": "redis:8.2.1",
                    "autoUpdates": {
                      "type": "vuln",
                      "schedule": [
                        {
                          "day": 0,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 1,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 2,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 3,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 4,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 5,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 6,
                          "endHour": 6,
                          "startHour": 2
                        }
                      ]
                    }
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Private Railway hostname used by services in the same project",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Internal Redis port",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Default Redis ACL username",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private Redis connection string used by GitTerm services",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Compatibility alias for clients expecting REDISPASSWORD",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Automatically generated Redis password",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "description": "Public connection string for external Redis access",
                      "defaultValue": "redis://default:${{ REDIS_PASSWORD }}@${{ RAILWAY_TCP_PROXY_DOMAIN }}:${{ RAILWAY_TCP_PROXY_PORT }}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "6379": {}
                    }
                  },
                  "volumeMounts": {
                    "3d76f851-e0f5-480a-ab7c-3f40d218b304": {
                      "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."
                  }
                },
                "460403fa-782e-4009-adf1-af14f81866c9": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17",
                    "autoUpdates": {
                      "type": "vuln",
                      "schedule": [
                        {
                          "day": 0,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 1,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 2,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 3,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 4,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 5,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 6,
                          "endHour": 6,
                          "startHour": 2
                        }
                      ]
                    }
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public URL to connect to Postgres database, used by the Data panel.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "460403fa-782e-4009-adf1-af14f81866c9": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                },
                "789bc28a-d12d-423c-aaa4-195e8a2a0c1b": {
                  "icon": "https://svgl.app/library/nextjs_icon_dark.svg",
                  "name": "gitterm-web",
                  "source": {
                    "image": "ghcr.io/opeoginni/gitterm-web"
                  },
                  "variables": {
                    "NEXT_PUBLIC_AUTH_URL": {
                      "description": "Better Auth origin; do not append /api/auth",
                      "defaultValue": "https://${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_SERVER_URL": {
                      "description": "Public API endpoint used by the web app",
                      "defaultValue": "https://${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}/api"
                    },
                    "NEXT_PUBLIC_BASE_DOMAIN": {
                      "description": "Public domain without protocol",
                      "defaultValue": "${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_LISTENER_URL": {
                      "description": "Public real-time listener endpoint",
                      "defaultValue": "https://${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}/listener"
                    },
                    "NEXT_PUBLIC_ROUTING_MODE": {
                      "description": "Must match the server and proxy routing mode",
                      "defaultValue": "path"
                    },
                    "NEXT_PUBLIC_ENABLE_BILLING": {
                      "description": "Disables managed billing UI",
                      "defaultValue": "false"
                    },
                    "NEXT_PUBLIC_GITHUB_APP_NAME": {
                      "isOptional": true,
                      "description": "Optional GitHub App slug used for installation links",
                      "defaultValue": ""
                    },
                    "NEXT_PUBLIC_ENABLE_EMAIL_AUTH": {
                      "description": "Keeps the email login UI synchronized with the server",
                      "defaultValue": "${{gitterm-server.ENABLE_EMAIL_AUTH}}"
                    },
                    "NEXT_PUBLIC_ENABLE_GITHUB_AUTH": {
                      "description": "Keeps the GitHub login UI synchronized with the server",
                      "defaultValue": "${{gitterm-server.ENABLE_GITHUB_AUTH}}"
                    }
                  }
                },
                "d593f732-5a5b-4799-a813-883ef506a338": {
                  "icon": "https://devicons.railway.app/Hono",
                  "name": "gitterm-listener",
                  "source": {
                    "image": "ghcr.io/opeoginni/gitterm-listener"
                  },
                  "variables": {
                    "SERVER_URL": {
                      "isOptional": false,
                      "description": "Private address of the API server",
                      "defaultValue": "http://${{gitterm-server.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "BASE_DOMAIN": {
                      "isOptional": false,
                      "description": "Public application domain without protocol",
                      "defaultValue": "${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "CORS_ORIGIN": {
                      "isOptional": false,
                      "description": "Browser origin allowed to open subscriptions",
                      "defaultValue": "https://${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Database used for authentication and webhook processing",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "BETTER_AUTH_URL": {
                      "description": "Public Better Auth origin",
                      "defaultValue": "https://${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "INTERNAL_API_KEY": {
                      "isOptional": false,
                      "description": "Shared key used for protected server procedures",
                      "defaultValue": "${{gitterm-server.INTERNAL_API_KEY}}"
                    },
                    "BETTER_AUTH_SECRET": {
                      "description": "Shared auth secret required to validate sessions",
                      "defaultValue": "${{gitterm-server.BETTER_AUTH_SECRET}}"
                    },
                    "GITHUB_WEBHOOK_SECRET": {
                      "isOptional": true,
                      "description": "Optional shared GitHub webhook verification secret",
                      "defaultValue": "${{gitterm-server.GITHUB_WEBHOOK_SECRET}}"
                    }
                  },
                  "networking": {}
                },
                "df819e6d-0011-4717-b523-38f71fbc6c2e": {
                  "icon": "https://devicons.railway.app/Bun",
                  "name": "gitterm-idle-reaper-worker",
                  "source": {
                    "image": "ghcr.io/opeoginni/gitterm-idle-reaper-worker"
                  },
                  "variables": {
                    "SERVER_URL": {
                      "isOptional": false,
                      "description": "Private address of the API server",
                      "defaultValue": "http://${{gitterm-server.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "DEPLOYMENT_MODE": {
                      "description": "Uses self-hosted lifecycle behavior without managed quotas",
                      "defaultValue": "self-hosted"
                    },
                    "INTERNAL_API_KEY": {
                      "isOptional": false,
                      "description": "Shared key used for workspace lifecycle procedures",
                      "defaultValue": "${{gitterm-server.INTERNAL_API_KEY}}"
                    },
                    "ENABLE_IDLE_REAPING": {
                      "description": "Controls automatic idle workspace cleanup",
                      "defaultValue": "${{gitterm-server.ENABLE_IDLE_REAPING}}"
                    }
                  }
                },
                "e3c045ad-052f-40b5-af01-707c6e47ce7a": {
                  "icon": "https://upload.wikimedia.org/wikipedia/commons/e/e5/Caddyserver_logo_-_no_wordmark.svg",
                  "name": "gitterm-caddy-proxy",
                  "deploy": {
                    "healthcheckPath": "/health"
                  },
                  "source": {
                    "image": "ghcr.io/opeoginni/gitterm-proxy"
                  },
                  "variables": {
                    "WEB_URL": {
                      "isOptional": false,
                      "description": "Private Railway address of the web service",
                      "defaultValue": "http://${{gitterm-web.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "SERVER_URL": {
                      "isOptional": false,
                      "description": "Private Railway address of the API server",
                      "defaultValue": "http://${{gitterm-server.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "BASE_DOMAIN": {
                      "isOptional": false,
                      "description": "Public domain assigned to the proxy",
                      "defaultValue": "${{gitterm-caddy-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LISTENER_URL": {
                      "isOptional": false,
                      "description": "Private Railway address of the listener",
                      "defaultValue": "http://${{gitterm-listener.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "ROUTING_MODE": {
                      "isOptional": false,
                      "description": "Uses single-domain /ws/... workspace routing",
                      "defaultValue": "path"
                    },
                    "INTERNAL_API_KEY": {
                      "isOptional": false,
                      "description": "Shared key used when Caddy calls protected server endpoints",
                      "defaultValue": "${{gitterm-server.INTERNAL_API_KEY}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "gitterm-caddy-proxy",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 7,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0"
}
