diff --git a/apps/docs/deployment/index.html b/apps/docs/deployment/index.html index 4c3bf6b..2968b80 100644 --- a/apps/docs/deployment/index.html +++ b/apps/docs/deployment/index.html @@ -134,7 +134,8 @@

Platform-Specific Guides

Railway (Recommended)

Railway auto-deploys from GitHub and natively supports Docker-based services. - The repo includes a railway.toml config for all five services. + Build and deploy settings live in each Railway service's settings, not in a + railway.toml. See docs/deployment.md for the per-service values.

  1. Fork or push the repo to GitHub
  2. diff --git a/apps/release-bot/README.md b/apps/release-bot/README.md index b43d37e..d3784a9 100644 --- a/apps/release-bot/README.md +++ b/apps/release-bot/README.md @@ -324,10 +324,13 @@ summary written to replace them. ## Deployment -A Railway cron service. `railway.toml` carries the build config, the restart -policy, the schedule and the watch patterns, so a recreated service is still -scheduled rather than running once at deploy and never again, and an unrelated -push elsewhere in the monorepo does not trigger an extra run. +A Railway cron service. Its build config, restart policy, schedule and watch +patterns live in the Railway service settings, not in a file: Railway deprecated +`railway.toml` and stops reading it on 2026-12-01. Without the schedule, the +service runs once at deploy and never again, with no error anywhere to say so. +Without the watch patterns, an unrelated push elsewhere in the monorepo triggers +an extra run. So a recreated service needs all of them set again, as listed under +"Setting it up on Railway". `restartPolicyType` is `NEVER`, unlike the long-running services in this repo. A completed run exits, and an `ALWAYS` policy would read that as a crash and restart @@ -367,8 +370,7 @@ channel at once could both decide the same release is unannounced and both post it. It also means the interval is not a safety limit: Railway allows anything down to 5 minutes, and hourly is a choice about cost and channel noise. -To change it, edit `cronSchedule` in `railway.toml` and redeploy. Railway only -applies the schedule from that file on a deploy. +To change it, edit the Cron Schedule in the service settings. ### YouTube API key @@ -400,11 +402,41 @@ allowance of 10,000 a day. 1. In the Outpost Railway project, add a service from the `CopilotKit/outpost` repo, named `outpost-release-bot`. -2. Under Settings -> Config-as-code, set the config file path to - `apps/release-bot/railway.toml`. Leave Root Directory empty: the build context - has to be the repo root, because the Dockerfile runs `turbo prune` across the - monorepo. The file sets the Dockerfile build, the hourly schedule, the restart - policy and the watch patterns, so none of those need setting in the dashboard. +2. Leave Root Directory and the Config file path empty: the build context has to + be the repo root, because the Dockerfile runs `turbo prune` across the + monorepo. In the service settings, set: + - Builder: Dockerfile, Dockerfile path `apps/release-bot/Dockerfile`. + - Cron Schedule: `0 * * * *`. + - Restart policy: `NEVER`. A completed run exits 0, and `ALWAYS` would restart + it in a loop, running the job back to back. + - Watch paths, every entry anchored with a leading slash: + + ``` + /apps/release-bot/** + !/apps/release-bot/README.md + !/apps/release-bot/.env.example + !/apps/release-bot/src/__tests__/** + !/apps/release-bot/vitest.config.ts + !/apps/release-bot/tsconfig.test.json + /package.json + /pnpm-lock.yaml + /pnpm-workspace.yaml + /.npmrc + /tsconfig.json + /turbo.json + /.dockerignore + ``` + + These are gitignore-style patterns, so an unanchored `package.json` would + match every one in the repo. The list has to name every root file that + changes this image (the root `package.json` pins the package manager, and + `.dockerignore` decides the build context), or the image goes stale instead + of rebuilding. It stays correct only while this package has no workspace + dependencies; the first one means adding `/packages/**` too. The negations + keep docs and tests, which do not reach the image, from redeploying the + service and firing a run off schedule. `/pnpm-lock.yaml` is watched + unconditionally, so a dependency bump anywhere still redeploys it. + 3. Set the variables from the table above under Variables. At minimum `DISCORD_BOT_TOKEN`, plus a channel id per source you want running. Release sources also need `OPENAI_API_KEY` and the three `GITHUB_APP_*` variables diff --git a/docs/deployment.md b/docs/deployment.md index a58aa17..fef121a 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -17,7 +17,7 @@ Railway auto-deploys from GitHub and natively supports Docker-based services. 2. Create a new project on [Railway](https://railway.app) 3. Add a **PostgreSQL** service (Railway has native Postgres with pgvector support) 4. Enable pgvector: connect to the database and run `CREATE EXTENSION IF NOT EXISTS vector;` -5. Add seven services from the repo, each pointing to its Dockerfile and `railway.toml` (set each service's Config file path to `apps//railway.toml`, Root Directory empty — build context must be repo root): +5. Add seven services from the repo, each pointing to its Dockerfile. Leave Root Directory empty: the build context must be the repo root, because every Dockerfile runs `turbo prune` across the monorepo. Set each service's build and deploy settings in the service settings, as listed in [Railway service settings](#railway-service-settings) below: - **outpost-web** — `apps/web/Dockerfile` (web service, port 3000, health check `/api/health`) - **outpost-discord-bot** — `apps/discord-bot/Dockerfile` (background worker, no public URL needed — gateway connects outbound) - **outpost-github-app** — `apps/github-app/Dockerfile` (web service, port 3200, needs public URL for webhooks) @@ -29,6 +29,28 @@ Railway auto-deploys from GitHub and natively supports Docker-based services. 7. Fill in the remaining secret environment variables (`DISCORD_TOKEN`, `OPENAI_API_KEY`, etc. — see Environment Variables below) 8. Configure custom domains for the web dashboard, GitHub App webhook endpoint, Teams bot messaging endpoint, and Linear sync webhook endpoint +### Railway service settings + +Railway deprecated config-as-code files (`railway.toml` / `railway.json`) and stops +reading them on 2026-12-01, so every build and deploy setting lives in the +service settings instead. Leave each service's Config file path empty. + +| Service | Dockerfile path | Healthcheck path | Restart policy | Cron schedule | Watch paths | +| --------------------- | ----------------------------- | ---------------- | -------------- | ------------- | ---------------------- | +| `outpost-web` | `apps/web/Dockerfile` | (none) | (default) | -- | -- | +| `outpost-github-app` | `apps/github-app/Dockerfile` | `/health` | `ALWAYS` | -- | -- | +| `outpost-worker` | `apps/worker/Dockerfile` | `/health` | `ALWAYS` | -- | -- | +| `outpost-discord-bot` | `apps/discord-bot/Dockerfile` | (none) | `ALWAYS` | -- | -- | +| `outpost-release-bot` | `apps/release-bot/Dockerfile` | (none) | `NEVER` | `0 * * * *` | see release-bot README | +| `outpost-slack-bot` | `apps/slack-bot/Dockerfile` | (none) | `ALWAYS` | -- | -- | +| `outpost-teams-bot` | `apps/teams-bot/Dockerfile` | `/health` | `ALWAYS` | -- | -- | +| `outpost-linear-sync` | `apps/linear-sync/Dockerfile` | `/health` | `ALWAYS` | -- | -- | + +Set the builder to Dockerfile. While a service has no Config file path, Railway still reads a +`railway.toml` at the repo root of the deployed commit, and that file wins over the service +settings. A branch or fork that still has one builds whatever it names, so keep it out of +every branch a service deploys from. + ### What gets deployed | Service | Type | Port (default) | Health Check | @@ -126,7 +148,7 @@ Outpost's GitHub integration (`apps/github-app`) responds to issues and discussi Optional: `GITHUB_TEAM_LOGINS` (comma-separated GitHub logins treated as internal team members, used by triage logic). -5. **Deploy.** `outpost-github-app` is already defined as a Railway service (see the Quick Start section above) — point its Config file path at `apps/github-app/railway.toml`, leave Root Directory empty, add the env vars, deploy. Health check hits `GET /health`. +5. **Deploy.** `outpost-github-app` is already defined as a Railway service (see the Quick Start section above) — set it up as listed in [Railway service settings](#railway-service-settings), leave Root Directory empty, add the env vars, deploy. Health check hits `GET /health`. 6. **Verify.** Open an issue on the installed repo. The agent should reply with an AI-generated answer plus a "Was this helpful? 👍/👎" prompt. React to it, then either wait for the next 24h poll or trigger `GITHUB_REACTION_POLL` manually to confirm the reaction lands as `feedback` on the `Message` row. diff --git a/railway.toml b/railway.toml deleted file mode 100644 index a4c2b9f..0000000 --- a/railway.toml +++ /dev/null @@ -1,32 +0,0 @@ -# Railway configuration — outpost-web (root / default config) -# https://docs.railway.com/reference/config-as-code -# -# Railway config-as-code is SINGLE-SERVICE per file (top-level [build]/[deploy]). -# There is NO [services.] multi-service syntax. The previous version of this -# file used [services.*] blocks, which Railway silently IGNORED — every service then -# fell back to the auto-detect (Railpack) builder and failed to build with -# "No start command detected". -# -# Monorepo layout — each service has its own single-service config file: -# outpost-web -> railway.toml (this file, the default root config) -# outpost-discord-bot -> apps/discord-bot/railway.toml -# outpost-github-app -> apps/github-app/railway.toml -# outpost-slack-bot -> apps/slack-bot/railway.toml -# outpost-teams-bot -> apps/teams-bot/railway.toml -# outpost-linear-sync -> apps/linear-sync/railway.toml -# outpost-worker -> apps/worker/railway.toml -# outpost-release-bot -> apps/release-bot/railway.toml -# -# Each non-web service must point its "Config file path" (Railway dashboard -> -# service -> Settings -> Config-as-code) at its file above. Build context is the -# repo ROOT for every service (the Dockerfiles run `turbo prune`), so leave each -# service's Root Directory empty. -# -# NOTE: web's [deploy] settings (healthcheck, etc.) stay managed in the Railway -# dashboard and are intentionally NOT overridden here, to avoid changing the live -# service. Add a [deploy] section if/when you want them version-controlled -# (web's health endpoint is /api/health). - -[build] -builder = "DOCKERFILE" -dockerfilePath = "apps/web/Dockerfile"