Skip to content

drips-network/vibe-caddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vibe-caddy

Caddy reverse proxy for experiments.drips.network. Routes /<slug> and everything under it to internal Railway services.

Adding a new experiment is just an env var change — no code edits here.

How it works

  • One public Railway service (vibe-caddy) bound to experiments.drips.network.
  • On startup, entrypoint.sh reads the VIBES_APPS env var, generates a Caddyfile, then execs Caddy.
  • For each entry, Caddy serves /<slug> and /<slug>/* and reverse-proxies to the configured internal target. The path is preserved (not stripped).
  • Path is preserved so each app's static asset URLs stay namespaced (e.g. /<slug>/_next/...). Each Next.js experiment must therefore set basePath: '/<slug>' in its next.config. See vibes-hello-world for the pattern.

VIBES_APPS format

Comma-separated slug=host:port pairs:

VIBES_APPS=hello=vibes-hello-world.railway.internal:3000,foo=vibes-foo.railway.internal:3000

Whitespace around entries is fine.

Adding a new experiment

  1. Deploy the new app as its own service in the same Railway project. Note its service name (e.g. vibes-foo) and listening port (e.g. 3000).
  2. Set BASE_PATH=/<slug> on that service so the app builds with the right basePath (Next.js bakes this into the build).
  3. On vibe-caddy, append the new entry to VIBES_APPS:
    VIBES_APPS=...,foo=vibes-foo.railway.internal:3000
    
  4. Redeploy vibe-caddy.

Local dev

docker build -t vibe-caddy .
docker run --rm -p 8080:8080 \
  -e VIBES_APPS="hello=host.docker.internal:3000" \
  vibe-caddy

Then visit http://localhost:8080/hello (assuming a Next.js app is running on host port 3000 with BASE_PATH=/hello).

About

Reverse Proxy for experiments.drips.network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors