feat(deploy): production Docker + Caddy stack for OpenRouter#1
Draft
NabilRFG12 wants to merge 1 commit into
Draft
feat(deploy): production Docker + Caddy stack for OpenRouter#1NabilRFG12 wants to merge 1 commit into
NabilRFG12 wants to merge 1 commit into
Conversation
Adds a turnkey VPS deployment path: docker-compose.prod.yml runs the app behind Caddy with automatic HTTPS, an OpenRouter-focused .env template, and a Caddyfile that streams SSE and avoids proxy timeouts on long generations. https://claude.ai/code/session_01TnEDwUuc2k9PvgRmHLGrfB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a turnkey self-hosted deployment path for a VPS, using OpenRouter as the LLM provider.
docker-compose.prod.yml— runs the app behind Caddy with automatic Let's Encrypt HTTPS; app is not exposed directly (only:80/:443via Caddy), with a healthcheck on/api/healthand persistent volumes for app data + Caddy certs.Caddyfile— reverse-proxies toopenmaic:3000, reads{$DOMAIN}/{$ACME_EMAIL}from env; streams SSE (e.g./api/chat) and uses no proxy timeouts so long generations (maxDuration = 300) aren't cut off..env.openrouter.example— OpenRouter-focused template (OPENROUTER_API_KEY,OPENROUTER_MODELS,DEFAULT_MODEL=openrouter:…,ACCESS_CODE,DOMAIN,ACME_EMAIL) with commented-out TTS/image/video slots..gitignore— track the new.env.openrouter.example(mirrors the existing!.env.exampleexception).Notes
OPENROUTER_MODELSreplaces the 2 built-in OpenRouter entries; the Settings UI surfaces any listed slug as selectable (lib/store/settings.tsfetchServerProviders), and the key stays server-side (isServerConfigured).sharp,@napi-rs/canvas) — needs ~2GB+ RAM.Test plan
cp .env.openrouter.example .env.local; setDOMAIN,ACME_EMAIL,OPENROUTER_API_KEY,ACCESS_CODEdocker compose -f docker-compose.prod.yml up --build -don a VPS with a domain + ports 80/443 openOPENROUTER_MODELSlist selectableDOMAIN=:80and confirm the app serves without a certhttps://claude.ai/code/session_01TnEDwUuc2k9PvgRmHLGrfB
Generated by Claude Code