{
  "manifest_version": "1.0.0",
  "template": {
    "id": "59c4d247-fb14-45fe-a9a9-17e44741ffd9",
    "slug": "trueforge-1",
    "name": "trueforge",
    "description": "Hosted TrueForge: agent harness with UI, Postgres & Redis",
    "url": "https://railway.com/deploy/trueforge-1",
    "upstream": {
      "repo_url": "https://github.com/truefoundry/trueforge"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "trueforge",
      "source": {
        "repo": "https://github.com/truefoundry/trueforge"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Redis Host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Fully qualified redis url to connect to",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Password to connect to Redis",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Postgres Host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Postgres port",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Postgres username",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Postgres database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Postgres password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Postgres database name",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Postgres Database to connect to",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Postgres user",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Postgres password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_URL",
      "service": "trueforge",
      "description": "Redis URL to connect to",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "STANDALONE",
      "service": "trueforge",
      "description": "Keep this as false to run in server mode",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DATABASE_URL",
      "service": "trueforge",
      "description": "Postgres Database URL to connect to",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "OIDC_CLIENT_ID",
      "service": "trueforge",
      "description": "OIDC client ID from the IdP application.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "OIDC_ISSUER_URL",
      "service": "trueforge",
      "description": "IdP issuer URL (discovery at /.well-known/openid-configuration).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PUBLIC_BASE_URL",
      "service": "trueforge",
      "description": "Base URL for Trueforge",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "OIDC_CLIENT_SECRET",
      "service": "trueforge",
      "description": "OIDC client secret from the IdP application.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "OIDC_USER_ROLE_CLAIM",
      "service": "trueforge",
      "description": "ID-token claim inspected for admin membership (e.g. groups, roles, email)",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "OIDC_ADMIN_ROLE_VALUE",
      "service": "trueforge",
      "description": "Exact claim value that grants admin (case-sensitive).",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "trueforge",
      "description": "Path to dockerfile in the repository",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "OIDC_USER_REFERENCE_CLAIM",
      "service": "trueforge",
      "description": "ID-token claim used as the user id for session ownership (e.g. email, sub).",
      "secret": false,
      "strategy": "ask_user"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "trueforge-1"
      }
    },
    "cli": "railway deploy --template trueforge-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "59c4d247-fb14-45fe-a9a9-17e44741ffd9",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "18d091d0-50a9-4234-9e8a-a7c86aba9c00": {
                  "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\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Redis Host",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Fully qualified redis url to connect to",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to Redis",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "18d091d0-50a9-4234-9e8a-a7c86aba9c00": {
                      "mountPath": "/data"
                    }
                  }
                },
                "1ce24875-e081-454e-a504-b51c55b68277": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": true,
                      "description": "Pg data",
                      "defaultValue": ""
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Postgres Host",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Postgres port",
                      "defaultValue": "{{PGPORT}}"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Postgres username",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Postgres database name",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Postgres database name",
                      "defaultValue": "{{POSTGRES_DB}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres Database to connect to",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres user",
                      "defaultValue": "{{POSTGRES_USER}}"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate",
                      "defaultValue": ""
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Time to drain before shutting down application",
                      "defaultValue": ""
                    }
                  },
                  "volumeMounts": {
                    "1ce24875-e081-454e-a504-b51c55b68277": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "e6b9a895-a7ab-47c7-8809-9225c9c0b5e7": {
                  "icon": "https://raw.githubusercontent.com/truefoundry/trueforge/main/docs/assets/trueforge-black.svg",
                  "name": "trueforge",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 5
                  },
                  "source": {
                    "repo": "https://github.com/truefoundry/trueforge",
                    "rootDirectory": null
                  },
                  "variables": {
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis URL to connect to",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "STANDALONE": {
                      "isOptional": false,
                      "description": "Keep this as false to run in server mode",
                      "defaultValue": "false"
                    },
                    "OIDC_SCOPES": {
                      "isOptional": true,
                      "description": "OAuth scopes for the authorize request.",
                      "defaultValue": ""
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres Database URL to connect to",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "OIDC_CLIENT_ID": {
                      "isOptional": false,
                      "description": "OIDC client ID from the IdP application.",
                      "defaultValue": "${{shared.OIDC_CLIENT_ID}}"
                    },
                    "OIDC_ISSUER_URL": {
                      "isOptional": false,
                      "description": "IdP issuer URL (discovery at /.well-known/openid-configuration).",
                      "defaultValue": "${{shared.OIDC_ISSUER_URL}}"
                    },
                    "PUBLIC_BASE_URL": {
                      "isOptional": false,
                      "description": "Base URL for Trueforge",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "OIDC_CLIENT_SECRET": {
                      "isOptional": false,
                      "description": "OIDC client secret from the IdP application.",
                      "defaultValue": "${{shared.OIDC_CLIENT_SECRET}}"
                    },
                    "OIDC_ALLOWED_EMAILS": {
                      "isOptional": true,
                      "description": "Comma-separated email allowlist (exact and/or *@domain globs); empty = unrestricted.",
                      "defaultValue": ""
                    },
                    "OIDC_USER_ROLE_CLAIM": {
                      "isOptional": false,
                      "description": "ID-token claim inspected for admin membership (e.g. groups, roles, email)",
                      "defaultValue": "{{OIDC_USER_ROLE_CLAIM}}"
                    },
                    "OIDC_ADMIN_ROLE_VALUE": {
                      "isOptional": false,
                      "description": "Exact claim value that grants admin (case-sensitive).",
                      "defaultValue": "{{OIDC_ADMIN_ROLE_VALUE}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Path to dockerfile in the repository",
                      "defaultValue": "{{RAILWAY_DOCKERFILE_PATH}}"
                    },
                    "OIDC_USER_REFERENCE_CLAIM": {
                      "isOptional": false,
                      "description": "ID-token claim used as the user id for session ownership (e.g. email, sub).",
                      "defaultValue": "{{OIDC_USER_REFERENCE_CLAIM}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "trueforge",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-22T16:14:56.866Z",
  "generator_version": "0.1.0"
}
