railway-devops
Provides expert guidance and guardrails for Railway deployment and production database operations.
来源信息
- 仓库
- sfgray26/CBB_Betting
- 最近来源活动
- 2026年5月7日 13:16
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 0
- 分支
- 0
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- railway-devops
- description
- Provides expert guidance and guardrails for Railway deployment and production database operations.
# Railway DevOps Skill
This skill enforces the strict operational rules for CBB Edge production environments on Railway, preventing unresolvable hostname errors and ensuring reliable log filtering.
## When to Use
Activate this skill when:
- Running Python scripts that connect to the production database.
- Tailing or filtering Railway logs.
- Verifying environment variables.
- Investigating `OperationalError: could not translate host name` failures.
## Core Workflow
### 1. Database Command Rule (CRITICAL)
Production `DATABASE_URL` uses internal Railway hostnames that do NOT resolve locally on Windows.
| Scenario | Command Pattern | Why |
|----------|-----------------|-----|
| **Local / No DB** | `railway run <cmd>` | Injects env vars only. Safe for logs/local logic. |
| **Production / DB Access** | `railway ssh <cmd>` | Runs inside the container where DNS resolves. |
### 2. Log Tailing & Filtering
Use the following patterns to monitor the production service:
```bash
# Tail all logs
railway logs --follow
# Filter logs for a specific job (e.g., player_id_mapping)
railway run python scripts/devops/railway_logs_filter.py --job player_id_mapping --lines 50
```
### 3. Environment Variable Audit
```bash
# List all variables to check for missing keys
railway variables
# Set a critical gate variable
railway variables set INTEGRITY_SWEEP_ENABLED=false
```
## Guidelines
- **No Local DB Connections:** Never attempt to connect to the internal production DB hostname directly from a local terminal. Always use `railway ssh`.
- **Fail-Safe Triage:** If a command fails with a "host name" error, retry with `railway ssh`.
- **Selective Logging:** Prefer `railway_logs_filter.py` over raw `railway logs` for specific job debugging.
## Examples
"Run the database health check script."
-> *Action:* `railway ssh python scripts/devops/db_health.py`
"Check the logs for the ingestion orchestrator."
-> *Action:* `railway run python scripts/devops/railway_logs_filter.py --job ingestion_orchestrator`
在 GitHub 查看