{
  "manifest_version": "1.0.0",
  "template": {
    "id": "319734c4-b2c0-4c4e-ae41-568e1cbebfdf",
    "slug": "bytebase",
    "name": "Bytebase",
    "description": "Database DevOps: schema change review, versioning and access governance",
    "url": "https://railway.com/deploy/bytebase",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/bytebase-railway"
    }
  },
  "services": [
    {
      "name": "bytebase",
      "source": {
        "repo": "https://github.com/gridalpha/bytebase-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/opt/bytebase",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "bytebase",
      "description": "Public HTTP port for the container",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "PG_URL",
      "service": "bytebase",
      "description": "External metadata database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ALLOW_SIGNUP",
      "service": "bytebase",
      "description": "Set true to reopen public self-service sign-up",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "EXTERNAL_URL",
      "service": "bytebase",
      "description": "Public URL used in generated links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BYTEBASE_DATA_DIR",
      "service": "bytebase",
      "description": "Data directory and volume mount path",
      "secret": false,
      "strategy": "default",
      "default": "/var/opt/bytebase"
    },
    {
      "key": "BYTEBASE_ADMIN_NAME",
      "service": "bytebase",
      "description": "Display name for that account",
      "secret": false,
      "strategy": "default",
      "default": "Workspace Admin"
    },
    {
      "key": "BYTEBASE_ADMIN_EMAIL",
      "service": "bytebase",
      "description": "First workspace administrator",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "BYTEBASE_INTERNAL_PORT",
      "service": "bytebase",
      "description": "Loopback port the server binds",
      "secret": false,
      "strategy": "default",
      "default": "8090"
    },
    {
      "key": "BYTEBASE_ADMIN_PASSWORD",
      "service": "bytebase",
      "description": "Password for that account, generated once",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "bytebase",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "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": "Superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "bytebase"
      }
    },
    "cli": "railway deploy --template bytebase",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "319734c4-b2c0-4c4e-ae41-568e1cbebfdf",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "64edc834-6afc-40e2-8451-fef7a408249c": {
                  "icon": "https://raw.githubusercontent.com/bytebase/bytebase/main/frontend/src/assets/logo-full-dark.svg",
                  "name": "bytebase",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/bytebase-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Public HTTP port for the container",
                      "defaultValue": "8080"
                    },
                    "PG_URL": {
                      "isOptional": false,
                      "description": "External metadata database",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "ALLOW_SIGNUP": {
                      "isOptional": false,
                      "description": "Set true to reopen public self-service sign-up",
                      "defaultValue": "false"
                    },
                    "EXTERNAL_URL": {
                      "isOptional": false,
                      "description": "Public URL used in generated links",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "BYTEBASE_DATA_DIR": {
                      "isOptional": false,
                      "description": "Data directory and volume mount path",
                      "defaultValue": "/var/opt/bytebase"
                    },
                    "BYTEBASE_ADMIN_NAME": {
                      "isOptional": false,
                      "description": "Display name for that account",
                      "defaultValue": "Workspace Admin"
                    },
                    "BYTEBASE_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "First workspace administrator",
                      "defaultValue": "admin@example.com"
                    },
                    "BYTEBASE_INTERNAL_PORT": {
                      "isOptional": false,
                      "description": "Loopback port the server binds",
                      "defaultValue": "8090"
                    },
                    "BYTEBASE_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for that account, generated once",
                      "defaultValue": "{{BYTEBASE_ADMIN_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "64edc834-6afc-40e2-8451-fef7a408249c": {
                      "mountPath": "/var/opt/bytebase"
                    }
                  }
                },
                "ac4df96b-1449-4c78-b867-b170a2349e73": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/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": false,
                      "description": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "ac4df96b-1449-4c78-b867-b170a2349e73": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "bytebase",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-21T20:14:34.884Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_dfdd5f6765d54eed9b7a",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 80,
    "typical_build_seconds": 25,
    "typical_start_seconds": 10,
    "slowest_service": "bytebase"
  }
}
