Refactor/migrate from nginx to caddy#219
Merged
Merged
Conversation
- Removed nginx gateway configuration file and references throughout the project. - Updated documentation to reflect the change from nginx to Caddy, including repository structure, service boundaries, and getting started guides. - Modified installation and upgrade scripts to download and configure Caddy instead of nginx. - Adjusted environment variables and configuration settings in the ai-agent and realtime services to point to the new Caddy gateway. - Updated service documentation to indicate the new Caddy gateway endpoints and behavior.
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
Replaces nginx with Caddy as the gateway and web-app server, primarily to get automatic HTTPS (Let's Encrypt for real domains, a local CA otherwise) without hand-rolling certbot/ACME scripting.
deploy/caddy/Caddyfile,Caddyfile.dev) — replacesdeploy/nginx/gateway.conf/gateway.dev.conf. Same routing (/api,/ws,/storage,/plugins,/plugins-mcp, SPA fallback), plusSITE_ADDRESSnow controls automatic HTTPS: a concrete domain/IP gets a certificate (Let's Encrypt, or Caddy's local CA when it isn't publicly resolvable), while a bare port (:80, the default) stays plain HTTP for setups where TLS is already terminated upstream.apps/web/Caddyfile,apps/web/Dockerfile) — base image switched fromnginx:1.29-alpinetocaddy:2-alpine, with the same SPA fallback and immutable asset caching behavior as the old nginx config.dev/prod) — swaps thenginximage forcaddy:2-alpine. Prod additionally maps port 443 and addscaddy_data/caddy_configvolumes so issued certificates survive container restarts/recreation.install.sh— new interactive HTTPS prompt (defaults to the host's detected public IP), writesSITE_ADDRESS/GATEWAY_HTTPS_PORTinto.env, and downloadscaddy/Caddyfileinstead ofnginx/gateway.conf.upgrade.sh(new) — upgrade path for existing installations: backs updocker-compose.yml, the Caddyfile, and.env, downloads the refreshed compose file and Caddyfile, re-pins image versions when a specificPACA_VERSIONis requested, backfillsSITE_ADDRESS(derived from the existingPUBLIC_URL) andGATEWAY_HTTPS_PORTfor installs that predate this migration, then pulls and restarts the stack.cd.yml) — release assets now publishCaddyfile(wasgateway.conf) and the newupgrade.sh.deploy/README.md,docs/guides/getting-started.md,docs/guides/local-development.md, architecture docs, and service READMEs updated to reference Caddy and the new HTTPS setup/upgrade flow.Test plan
docker compose --env-file .env up -dbrings up the stack behind the Caddy gateway on plain HTTPSITE_ADDRESSset to a domain/IP issues a certificate and serves over HTTPSinstall.shinteractive flow (HTTPS prompt + public IP detection)upgrade.shrun against a pre-migration install correctly backfillsSITE_ADDRESS/GATEWAY_HTTPS_PORT