{
  "manifest_version": "1.0.0",
  "template": {
    "id": "d7cbaa0d-849a-4530-84f9-07fda0a75c75",
    "slug": "opik",
    "name": "Opik",
    "description": "Open-source LLM observability: evaluation, tracing and guardrails",
    "url": "https://railway.com/deploy/opik",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/opik-railway"
    }
  },
  "services": [
    {
      "name": "backend",
      "source": {
        "image": "ghcr.io/comet-ml/opik/opik-backend:2.2.45"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:9.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "python-backend",
      "source": {
        "image": "ghcr.io/comet-ml/opik/opik-python-backend:2.2.45"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "frontend",
      "source": {
        "repo": "https://github.com/gridalpha/opik-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "keeper",
      "source": {
        "repo": "https://github.com/gridalpha/opik-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/clickhouse",
      "http": false
    },
    {
      "name": "clickhouse",
      "source": {
        "repo": "https://github.com/gridalpha/opik-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/clickhouse",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "CORS",
      "service": "backend",
      "description": "Cross-origin requests to the API",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "PORT",
      "service": "backend",
      "description": "Admin port, used for the health check",
      "secret": false,
      "strategy": "default",
      "default": "8081"
    },
    {
      "key": "S3_URL",
      "service": "backend",
      "description": "Object storage endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "IS_MINIO",
      "service": "backend",
      "description": "Use the S3-compatible client and path-style URLs",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "JAVA_OPTS",
      "service": "backend",
      "description": "JVM flags; the Liquibase flag is required",
      "secret": false,
      "strategy": "default",
      "default": "-Dliquibase.propertySubstitutionEnabled=true -XX:+UseG1GC -XX:MaxRAMPercentage=70.0"
    },
    {
      "key": "REDIS_URL",
      "service": "backend",
      "description": "Locks, streams and queues",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_BUCKET",
      "service": "backend",
      "description": "Attachment bucket name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_REGION",
      "service": "backend",
      "description": "Bucket region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AWS_REGION",
      "service": "backend",
      "description": "Region for the AWS SDK",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "STATE_DB_URL",
      "service": "backend",
      "description": "State database host and options",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "STATE_DB_PASS",
      "service": "backend",
      "description": "State database password",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "STATE_DB_USER",
      "service": "backend",
      "description": "State database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ANALYTICS_DB_HOST",
      "service": "backend",
      "description": "ClickHouse private hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ANALYTICS_DB_PASS",
      "service": "backend",
      "description": "ClickHouse password",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ANALYTICS_DB_PORT",
      "service": "backend",
      "description": "ClickHouse HTTP port",
      "secret": false,
      "strategy": "default",
      "default": "8123"
    },
    {
      "key": "AWS_ACCESS_KEY_ID",
      "service": "backend",
      "description": "Bucket access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "STATE_DB_PROTOCOL",
      "service": "backend",
      "description": "JDBC scheme for the state database",
      "secret": false,
      "strategy": "default",
      "default": "jdbc:mysql://"
    },
    {
      "key": "OPIK_ENCRYPTION_KEY",
      "service": "backend",
      "description": "At-rest key for stored provider keys",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PYTHON_EVALUATOR_URL",
      "service": "backend",
      "description": "Python metric service",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ANALYTICS_DB_PROTOCOL",
      "service": "backend",
      "description": "ClickHouse client protocol",
      "secret": false,
      "strategy": "default",
      "default": "HTTP"
    },
    {
      "key": "ANALYTICS_DB_USERNAME",
      "service": "backend",
      "description": "ClickHouse user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AWS_SECRET_ACCESS_KEY",
      "service": "backend",
      "description": "Bucket secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "STATE_DB_DATABASE_NAME",
      "service": "backend",
      "description": "State database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TOGGLE_OPIK_AI_ENABLED",
      "service": "backend",
      "description": "Hosted-only AI assistant",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "OPIK_USAGE_REPORT_ENABLED",
      "service": "backend",
      "description": "Anonymous usage reporting to Comet",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "TOGGLE_GUARDRAILS_ENABLED",
      "service": "backend",
      "description": "Guardrails service is not deployed",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "ANALYTICS_DB_DATABASE_NAME",
      "service": "backend",
      "description": "ClickHouse database name",
      "secret": false,
      "strategy": "default",
      "default": "opik"
    },
    {
      "key": "ANALYTICS_DB_MIGRATIONS_URL",
      "service": "backend",
      "description": "ClickHouse URL for migrations",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ANALYTICS_DB_MIGRATIONS_PASS",
      "service": "backend",
      "description": "Migration password",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ANALYTICS_DB_MIGRATIONS_USER",
      "service": "backend",
      "description": "Migration user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TOGGLE_WELCOME_WIZARD_ENABLED",
      "service": "backend",
      "description": "First-run welcome dialog",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "backend",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "MYSQLHOST",
      "service": "MySQL",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLPORT",
      "service": "MySQL",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQLUSER",
      "service": "MySQL",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "MYSQL_URL",
      "service": "MySQL",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLDATABASE",
      "service": "MySQL",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQLPASSWORD",
      "service": "MySQL",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "Root password, read by the server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "python-backend",
      "description": "HTTP port for metric execution",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "REDIS_URL",
      "service": "python-backend",
      "description": "Job queue and worker registry",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "OPIK_URL_OVERRIDE",
      "service": "python-backend",
      "description": "API used by the SDK",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RQ_WORKER_ENABLED",
      "service": "python-backend",
      "description": "Run the optimizer worker in this process",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PYTHON_BACKEND_PORT",
      "service": "python-backend",
      "description": "Same port, read by the app",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "OPIK_OTEL_SDK_ENABLED",
      "service": "python-backend",
      "description": "OpenTelemetry instrumentation",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "OPIK_REVERSE_PROXY_URL",
      "service": "python-backend",
      "description": "Proxy URL for callbacks",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "OPTSTUDIO_MAX_CONCURRENT_JOBS",
      "service": "python-backend",
      "description": "Parallel optimizer jobs",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "PYTHON_CODE_EXECUTOR_STRATEGY",
      "service": "python-backend",
      "description": "Run metric code in-process, not in Docker",
      "secret": false,
      "strategy": "default",
      "default": "process"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "python-backend",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "PORT",
      "service": "frontend",
      "description": "Port nginx listens on",
      "secret": false,
      "strategy": "default",
      "default": "5173"
    },
    {
      "key": "NGINX_PORT",
      "service": "frontend",
      "description": "Same port, read by the image's own scripts",
      "secret": false,
      "strategy": "default",
      "default": "5173"
    },
    {
      "key": "OTEL_TRACE",
      "service": "frontend",
      "description": "nginx OpenTelemetry tracing",
      "secret": false,
      "strategy": "default",
      "default": "off"
    },
    {
      "key": "OPIK_BACKEND_HOST",
      "service": "frontend",
      "description": "Private hostname of the API",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "OPIK_BACKEND_PORT",
      "service": "frontend",
      "description": "API port proxied by nginx",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "OPIK_BASIC_AUTH_USER",
      "service": "frontend",
      "description": "Username for the UI and API",
      "secret": false,
      "strategy": "default",
      "default": "opik"
    },
    {
      "key": "OPIK_BASIC_AUTH_PASSWORD",
      "service": "frontend",
      "description": "Password for the UI and API",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "frontend",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE",
      "service": "frontend",
      "description": "Size workers from the CPU quota",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Auth password, read by the server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "keeper",
      "description": "Readiness port, used for the health check",
      "secret": false,
      "strategy": "default",
      "default": "9182"
    },
    {
      "key": "KEEPER_SERVER_ID",
      "service": "keeper",
      "description": "Raft node id",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "keeper",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "PORT",
      "service": "clickhouse",
      "description": "HTTP port, used for the health check",
      "secret": false,
      "strategy": "default",
      "default": "8123"
    },
    {
      "key": "KEEPER_HOSTS",
      "service": "clickhouse",
      "description": "Coordination node hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CLICKHOUSE_USER",
      "service": "clickhouse",
      "description": "Analytics database user",
      "secret": false,
      "strategy": "default",
      "default": "opik"
    },
    {
      "key": "CLICKHOUSE_CLUSTER",
      "service": "clickhouse",
      "description": "Cluster macro used by the migrations",
      "secret": false,
      "strategy": "default",
      "default": "cluster"
    },
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "clickhouse",
      "description": "Analytics database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CLICKHOUSE_SHARD_ID",
      "service": "clickhouse",
      "description": "Shard macro used by the migrations",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "CLICKHOUSE_REPLICA_ID",
      "service": "clickhouse",
      "description": "Replica macro; must stay stable",
      "secret": false,
      "strategy": "default",
      "default": "clickhouse"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "clickhouse",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "opik"
      }
    },
    "cli": "railway deploy --template opik",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "d7cbaa0d-849a-4530-84f9-07fda0a75c75",
            "serializedConfig": {
              "buckets": {
                "52188c00-cfb0-4445-8f7e-611b73970d0d": {
                  "name": "opik-attachments"
                }
              },
              "services": {
                "36b46675-68c4-4a67-b42a-4b317720c9fc": {
                  "icon": "https://raw.githubusercontent.com/comet-ml/opik/refs/heads/main/apps/opik-documentation/documentation/static/img/logo.svg",
                  "name": "backend",
                  "deploy": {
                    "startCommand": "/bin/bash -c \"./run_db_migrations.sh && ./provision_agent_insights_readonly_user.sh && ./entrypoint.sh\"",
                    "healthcheckPath": "/healthcheck",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/comet-ml/opik/opik-backend:2.2.45"
                  },
                  "variables": {
                    "CORS": {
                      "isOptional": false,
                      "description": "Cross-origin requests to the API",
                      "defaultValue": "false"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "Admin port, used for the health check",
                      "defaultValue": "8081"
                    },
                    "S3_URL": {
                      "isOptional": false,
                      "description": "Object storage endpoint",
                      "defaultValue": "${{opik-attachments.ENDPOINT}}"
                    },
                    "IS_MINIO": {
                      "isOptional": false,
                      "description": "Use the S3-compatible client and path-style URLs",
                      "defaultValue": "true"
                    },
                    "JAVA_OPTS": {
                      "isOptional": false,
                      "description": "JVM flags; the Liquibase flag is required",
                      "defaultValue": "-Dliquibase.propertySubstitutionEnabled=true -XX:+UseG1GC -XX:MaxRAMPercentage=70.0"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Locks, streams and queues",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "S3_BUCKET": {
                      "isOptional": false,
                      "description": "Attachment bucket name",
                      "defaultValue": "${{opik-attachments.BUCKET}}"
                    },
                    "S3_REGION": {
                      "isOptional": false,
                      "description": "Bucket region",
                      "defaultValue": "${{opik-attachments.REGION}}"
                    },
                    "AWS_REGION": {
                      "isOptional": false,
                      "description": "Region for the AWS SDK",
                      "defaultValue": "${{opik-attachments.REGION}}"
                    },
                    "STATE_DB_URL": {
                      "isOptional": false,
                      "description": "State database host and options",
                      "defaultValue": "${{MySQL.RAILWAY_PRIVATE_DOMAIN}}:3306/${{MySQL.MYSQL_DATABASE}}?createDatabaseIfNotExist=true&rewriteBatchedStatements=true&connectionTimeZone=UTC&forceConnectionTimeZoneToSession=true&allowPublicKeyRetrieval=true"
                    },
                    "STATE_DB_PASS": {
                      "isOptional": false,
                      "description": "State database password",
                      "defaultValue": "${{MySQL.MYSQL_ROOT_PASSWORD}}"
                    },
                    "STATE_DB_USER": {
                      "isOptional": false,
                      "description": "State database user",
                      "defaultValue": "${{MySQL.MYSQLUSER}}"
                    },
                    "ANALYTICS_DB_HOST": {
                      "isOptional": false,
                      "description": "ClickHouse private hostname",
                      "defaultValue": "${{clickhouse.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "ANALYTICS_DB_PASS": {
                      "isOptional": false,
                      "description": "ClickHouse password",
                      "defaultValue": "${{clickhouse.CLICKHOUSE_PASSWORD}}"
                    },
                    "ANALYTICS_DB_PORT": {
                      "isOptional": false,
                      "description": "ClickHouse HTTP port",
                      "defaultValue": "8123"
                    },
                    "AWS_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Bucket access key",
                      "defaultValue": "${{opik-attachments.ACCESS_KEY_ID}}"
                    },
                    "STATE_DB_PROTOCOL": {
                      "isOptional": false,
                      "description": "JDBC scheme for the state database",
                      "defaultValue": "jdbc:mysql://"
                    },
                    "OPIK_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "At-rest key for stored provider keys",
                      "defaultValue": "{{OPIK_ENCRYPTION_KEY}}"
                    },
                    "PYTHON_EVALUATOR_URL": {
                      "isOptional": false,
                      "description": "Python metric service",
                      "defaultValue": "http://${{python-backend.RAILWAY_PRIVATE_DOMAIN}}:8000"
                    },
                    "ANALYTICS_DB_PROTOCOL": {
                      "isOptional": false,
                      "description": "ClickHouse client protocol",
                      "defaultValue": "HTTP"
                    },
                    "ANALYTICS_DB_USERNAME": {
                      "isOptional": false,
                      "description": "ClickHouse user",
                      "defaultValue": "${{clickhouse.CLICKHOUSE_USER}}"
                    },
                    "AWS_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Bucket secret key",
                      "defaultValue": "${{opik-attachments.SECRET_ACCESS_KEY}}"
                    },
                    "STATE_DB_DATABASE_NAME": {
                      "isOptional": false,
                      "description": "State database name",
                      "defaultValue": "${{MySQL.MYSQL_DATABASE}}"
                    },
                    "TOGGLE_OPIK_AI_ENABLED": {
                      "isOptional": false,
                      "description": "Hosted-only AI assistant",
                      "defaultValue": "false"
                    },
                    "OPIK_USAGE_REPORT_ENABLED": {
                      "isOptional": false,
                      "description": "Anonymous usage reporting to Comet",
                      "defaultValue": "false"
                    },
                    "TOGGLE_GUARDRAILS_ENABLED": {
                      "isOptional": false,
                      "description": "Guardrails service is not deployed",
                      "defaultValue": "false"
                    },
                    "ANALYTICS_DB_DATABASE_NAME": {
                      "isOptional": false,
                      "description": "ClickHouse database name",
                      "defaultValue": "opik"
                    },
                    "ANALYTICS_DB_MIGRATIONS_URL": {
                      "isOptional": false,
                      "description": "ClickHouse URL for migrations",
                      "defaultValue": "jdbc:clickhouse://${{clickhouse.RAILWAY_PRIVATE_DOMAIN}}:8123"
                    },
                    "ANALYTICS_DB_MIGRATIONS_PASS": {
                      "isOptional": false,
                      "description": "Migration password",
                      "defaultValue": "${{clickhouse.CLICKHOUSE_PASSWORD}}"
                    },
                    "ANALYTICS_DB_MIGRATIONS_USER": {
                      "isOptional": false,
                      "description": "Migration user",
                      "defaultValue": "${{clickhouse.CLICKHOUSE_USER}}"
                    },
                    "TOGGLE_WELCOME_WIZARD_ENABLED": {
                      "isOptional": false,
                      "description": "First-run welcome dialog",
                      "defaultValue": "true"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "30"
                    }
                  }
                },
                "615be644-13b2-4066-a80c-f3f20ebaf8f8": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mysql.svg",
                  "name": "MySQL",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mysql:9.4"
                  },
                  "variables": {
                    "MYSQLHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQLPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "3306"
                    },
                    "MYSQLUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "root"
                    },
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "mysql://${{ MYSQLUSER }}:${{ MYSQL_ROOT_PASSWORD }}@${{ RAILWAY_PRIVATE_DOMAIN }}:3306/${{ MYSQL_DATABASE }}"
                    },
                    "MYSQLDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{ MYSQL_DATABASE }}"
                    },
                    "MYSQLPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{ MYSQL_ROOT_PASSWORD }}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root password, read by the server",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "615be644-13b2-4066-a80c-f3f20ebaf8f8": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                },
                "62e3e090-7716-4d8e-a1ec-c7c95a4f0179": {
                  "icon": "https://raw.githubusercontent.com/comet-ml/opik/refs/heads/main/apps/opik-documentation/documentation/static/img/logo.svg",
                  "name": "python-backend",
                  "deploy": {
                    "startCommand": "tini -s -- /bin/sh -c \"exec gunicorn --access-logfile - --workers 1 --threads 5 --worker-class gthread --bind [::]:8000 --chdir ./src 'opik_backend:create_app()'\"",
                    "healthcheckPath": "/healthcheck",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/comet-ml/opik/opik-python-backend:2.2.45"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port for metric execution",
                      "defaultValue": "8000"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Job queue and worker registry",
                      "defaultValue": "${{Redis.REDIS_URL}}/0"
                    },
                    "OPIK_URL_OVERRIDE": {
                      "isOptional": false,
                      "description": "API used by the SDK",
                      "defaultValue": "http://${{backend.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "RQ_WORKER_ENABLED": {
                      "isOptional": false,
                      "description": "Run the optimizer worker in this process",
                      "defaultValue": "true"
                    },
                    "PYTHON_BACKEND_PORT": {
                      "isOptional": false,
                      "description": "Same port, read by the app",
                      "defaultValue": "8000"
                    },
                    "OPIK_OTEL_SDK_ENABLED": {
                      "isOptional": false,
                      "description": "OpenTelemetry instrumentation",
                      "defaultValue": "false"
                    },
                    "OPIK_REVERSE_PROXY_URL": {
                      "isOptional": false,
                      "description": "Proxy URL for callbacks",
                      "defaultValue": "http://${{frontend.RAILWAY_PRIVATE_DOMAIN}}:5173/api"
                    },
                    "OPTSTUDIO_MAX_CONCURRENT_JOBS": {
                      "isOptional": false,
                      "description": "Parallel optimizer jobs",
                      "defaultValue": "5"
                    },
                    "PYTHON_CODE_EXECUTOR_STRATEGY": {
                      "isOptional": false,
                      "description": "Run metric code in-process, not in Docker",
                      "defaultValue": "process"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "30"
                    }
                  }
                },
                "7a45aa70-ed49-4f16-a35d-8c398183b69a": {
                  "icon": "https://raw.githubusercontent.com/comet-ml/opik/refs/heads/main/apps/opik-documentation/documentation/static/img/logo.svg",
                  "name": "frontend",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/opik-railway",
                    "rootDirectory": "frontend"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port nginx listens on",
                      "defaultValue": "5173"
                    },
                    "NGINX_PORT": {
                      "isOptional": false,
                      "description": "Same port, read by the image's own scripts",
                      "defaultValue": "5173"
                    },
                    "OTEL_TRACE": {
                      "isOptional": false,
                      "description": "nginx OpenTelemetry tracing",
                      "defaultValue": "off"
                    },
                    "OPIK_BACKEND_HOST": {
                      "isOptional": false,
                      "description": "Private hostname of the API",
                      "defaultValue": "${{backend.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "OPIK_BACKEND_PORT": {
                      "isOptional": false,
                      "description": "API port proxied by nginx",
                      "defaultValue": "8080"
                    },
                    "OPIK_BASIC_AUTH_USER": {
                      "isOptional": false,
                      "description": "Username for the UI and API",
                      "defaultValue": "opik"
                    },
                    "OPIK_BASIC_AUTH_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the UI and API",
                      "defaultValue": "{{OPIK_BASIC_AUTH_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "30"
                    },
                    "NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE": {
                      "isOptional": false,
                      "description": "Size workers from the CPU quota",
                      "defaultValue": "1"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:5173": {
                        "port": 5173
                      }
                    }
                  }
                },
                "90bd5fff-16af-4bc6-b7f5-f8c1dc73461a": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/redis.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": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auth password, read by the server",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "90bd5fff-16af-4bc6-b7f5-f8c1dc73461a": {
                      "mountPath": "/data"
                    }
                  }
                },
                "9569756a-fee8-4d97-a12d-205195786824": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/clickhouse.svg",
                  "name": "keeper",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/opik-railway",
                    "rootDirectory": "keeper"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Readiness port, used for the health check",
                      "defaultValue": "9182"
                    },
                    "KEEPER_SERVER_ID": {
                      "isOptional": false,
                      "description": "Raft node id",
                      "defaultValue": "1"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "30"
                    }
                  },
                  "volumeMounts": {
                    "9569756a-fee8-4d97-a12d-205195786824": {
                      "mountPath": "/var/lib/clickhouse"
                    }
                  }
                },
                "f2dbd272-385b-4dc1-bfab-10d7c0265d69": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/clickhouse.svg",
                  "name": "clickhouse",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/opik-railway",
                    "rootDirectory": "clickhouse"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port, used for the health check",
                      "defaultValue": "8123"
                    },
                    "KEEPER_HOSTS": {
                      "isOptional": false,
                      "description": "Coordination node hostname",
                      "defaultValue": "${{keeper.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "CLICKHOUSE_USER": {
                      "isOptional": false,
                      "description": "Analytics database user",
                      "defaultValue": "opik"
                    },
                    "CLICKHOUSE_CLUSTER": {
                      "isOptional": false,
                      "description": "Cluster macro used by the migrations",
                      "defaultValue": "cluster"
                    },
                    "CLICKHOUSE_PASSWORD": {
                      "isOptional": false,
                      "description": "Analytics database password",
                      "defaultValue": "{{CLICKHOUSE_PASSWORD}}"
                    },
                    "CLICKHOUSE_SHARD_ID": {
                      "isOptional": false,
                      "description": "Shard macro used by the migrations",
                      "defaultValue": "1"
                    },
                    "CLICKHOUSE_REPLICA_ID": {
                      "isOptional": false,
                      "description": "Replica macro; must stay stable",
                      "defaultValue": "clickhouse"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "30"
                    }
                  },
                  "volumeMounts": {
                    "f2dbd272-385b-4dc1-bfab-10d7c0265d69": {
                      "mountPath": "/var/lib/clickhouse"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 7,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-21T20:10:43.320Z",
  "success_rate_30d": 0.1429,
  "validation": {
    "last_run_id": "run_c6267f4c498a412aabea",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ],
    "typical_ready_seconds": 173
  }
}
