From 53c9600236570c30e82f0343f88403fb5999966b Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Mon, 26 Oct 2026 12:04:44 +0000 Subject: [PATCH] dev2: c0ncerts.com on its own self-hosted Supabase; subnet_octet override c0ncerts.com never had a production database (Supabase env unset since Railway), so its accounts page was dead. New stack c0ncerts-com-supabase (api 8278, db 5578), gateway supabase.c0ncerts.com, env via secret: refs. The redeploy then collided with bittorrented.com, which was hand-built on c0ncerts' 10.200.78.0/24 on 2026-10-05; sites.d subnet_octet moves a site to a free /24 (c0ncerts -> 178) without touching the other stack. Co-Authored-By: Claude Opus 5.5 --- dev2/README.md | 5 ++++- dev2/dev2-site | 4 +++- dev2/sites.d/c0ncerts.com.json | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 dev2/sites.d/c0ncerts.com.json diff --git a/dev2/README.md b/dev2/README.md index 5bf5652..9b90a95 100644 --- a/dev2/README.md +++ b/dev2/README.md @@ -160,9 +160,12 @@ small file per site, so parallel migrations never edit a shared file: "companion_commands": { "genrewatch-worker": "bun run worker" }, "env_overrides": { "SITE_URL": "https://example.com" }, "pg_service": "Postgres-iVtY", "max_body": "256m", "branch": "master", - "env_remove": ["TURSO_DATABASE_URL", "TURSO_AUTH_TOKEN"] } + "env_remove": ["TURSO_DATABASE_URL", "TURSO_AUTH_TOKEN"], + "subnet_octet": 178 } ``` +`subnet_octet` replaces the `` in the app network `10.200..0/24` when another stack already holds that /24 (c0ncerts.com: bittorrented.com was hand-built on its 10.200.78.0/24). + ### Secrets in `env_overrides` `sites.d/` is committed and this repository is public, so a value that is a diff --git a/dev2/dev2-site b/dev2/dev2-site index f1eddbe..d2f89aa 100755 --- a/dev2/dev2-site +++ b/dev2/dev2-site @@ -685,7 +685,9 @@ def render_compose(s, st, app_port_inside, build_args=(), node_preset=()): # ran out at 34 networks on dev2, and widening them means restarting dockerd # under every container. 10.200..0/24 is deterministic and allowlisted # on the data ports. - n = s["port"] - FIRST_PORT + # `subnet_octet` in sites.d moves a site off a /24 another stack already holds + # (bittorrented.com was hand-built on c0ncerts.com's 10.200.78.0/24). + n = s.get("subnet_octet", s["port"] - FIRST_PORT) y.append(f"networks:\n default:\n ipam:\n config:\n - subnet: 10.200.{n}.0/24") # Healthchecks chosen by `dev2-site healthchecks` survive a re-render. return health_compose("\n".join(y) + "\n", st.get("healthchecks") or {}) diff --git a/dev2/sites.d/c0ncerts.com.json b/dev2/sites.d/c0ncerts.com.json new file mode 100644 index 0000000..5d6de50 --- /dev/null +++ b/dev2/sites.d/c0ncerts.com.json @@ -0,0 +1,16 @@ +{ + "db": "supabase", + "proxies": [ + { + "host": "supabase.c0ncerts.com", + "port": 8278, + "max_body": "512m" + } + ], + "env_overrides": { + "NEXT_PUBLIC_SUPABASE_URL": "https://supabase.c0ncerts.com", + "NEXT_PUBLIC_SUPABASE_ANON_KEY": "secret:NEXT_PUBLIC_SUPABASE_ANON_KEY", + "SUPABASE_SERVICE_ROLE_KEY": "secret:SUPABASE_SERVICE_ROLE_KEY" + }, + "subnet_octet": 178 +}