Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/docs/deployment/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ <h2>Platform-Specific Guides</h2>
<h3>Railway (Recommended)</h3>
<p>
Railway auto-deploys from GitHub and natively supports Docker-based services.
The repo includes a <code>railway.toml</code> config for all five services.
Build and deploy settings live in each Railway service's settings, not in a
<code>railway.toml</code>. See <code>docs/deployment.md</code> for the per-service values.
</p>
<ol>
<li>Fork or push the repo to GitHub</li>
Expand Down
54 changes: 43 additions & 11 deletions apps/release-bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
26 changes: 24 additions & 2 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<app>/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)
Expand All @@ -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 |
Expand Down Expand Up @@ -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.

Expand Down
32 changes: 0 additions & 32 deletions railway.toml

This file was deleted.

Loading