From 234a892119ab1c6c3e624c2c19d3465c5e27e130 Mon Sep 17 00:00:00 2001 From: jaxperro Date: Mon, 6 Jul 2026 00:53:42 -0400 Subject: [PATCH] railway: pin start command to host/start.sh (config-as-code) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The copybot service's custom start command was 'bash start.sh' — a relic of the scratchpad folder it was first deployed from; builds from the repo root have no root start.sh, so image rebuilds crashed and Railway kept serving the years-old image (which is also why start.sh changes never took effect via redeploy). railway.json now pins the start command; nixpacks.toml's default no longer points at the retired webhook_receiver. Co-Authored-By: Claude Fable 5 --- nixpacks.toml | 11 +++++------ railway.json | 8 ++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 railway.json diff --git a/nixpacks.toml b/nixpacks.toml index b141a779..8e4746c5 100644 --- a/nixpacks.toml +++ b/nixpacks.toml @@ -1,11 +1,10 @@ # Explicit build config for Railway/Nixpacks (pure-stdlib Python service). -# Default start = the Discord webhook receiver. For the 24/7 copybot worker, -# deploy a second service from this repo and override the start command with -# bash host/start.sh -# (see host/start.sh for the full setup). git is needed at runtime — the bot -# persists its book by committing state + feed back to GitHub. +# Start = the 24/7 copybot worker (bash host/start.sh, also pinned by +# railway.json's deploy.startCommand). git is needed at runtime — the bot +# persists its book by committing state + feed back to GitHub. The old +# webhook_receiver default is retired (archive/webhook_receiver.py). [phases.setup] nixPkgs = ["python311", "git"] [start] -cmd = "python3 webhook_receiver.py" +cmd = "bash host/start.sh" diff --git a/railway.json b/railway.json new file mode 100644 index 00000000..705e47dc --- /dev/null +++ b/railway.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://railway.com/railway.schema.json", + "deploy": { + "startCommand": "bash host/start.sh", + "restartPolicyType": "ON_FAILURE", + "restartPolicyMaxRetries": 10 + } +}