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
5 changes: 4 additions & 1 deletion dev2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<port-3200>` in the app network `10.200.<n>.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
Expand Down
4 changes: 3 additions & 1 deletion dev2/dev2-site
Original file line number Diff line number Diff line change
Expand Up @@ -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.<port-3200>.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 {})
Expand Down
16 changes: 16 additions & 0 deletions dev2/sites.d/c0ncerts.com.json
Original file line number Diff line number Diff line change
@@ -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
}
Loading