From 4666e7ee51637806f2954e82e578fbb47f818060 Mon Sep 17 00:00:00 2001 From: Aram Grigoryan <132480+aram356@users.noreply.github.com> Date: Thu, 15 Jan 2026 16:00:46 -0800 Subject: [PATCH 1/2] Clarify how to edit hosts for each OS --- CLAUDE.md | 10 +++++----- README.md | 15 +++++++++++---- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 3c4a63d..d9059d5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -16,19 +16,19 @@ A Caddy-based reverse proxy for local development with automatic SSL certificate ```bash # Generate certificates (first time only) -docker-compose --profile setup run --rm mkcert +docker compose --profile setup run --rm mkcert # Start the proxy -docker-compose up -d --build +docker compose up -d --build # View logs -docker-compose logs -f caddy +docker compose logs -f caddy # Stop the proxy -docker-compose down +docker compose down # Regenerate certificates -rm -rf certs/* && docker-compose --profile setup run --rm mkcert +rm -rf certs/* && docker compose --profile setup run --rm mkcert # Install CA on macOS sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ./certs/${DOMAIN}.rootCA.pem diff --git a/README.md b/README.md index 7e5aca4..c8d24b0 100644 --- a/README.md +++ b/README.md @@ -18,18 +18,25 @@ A Dockerized Caddy reverse proxy with automatic SSL certificate generation for l UPSTREAM_URL=http://host.docker.internal:3000 ``` - `UPSTREAM_URL` must include the scheme and port. +> [!WARNING] +> `UPSTREAM_URL` must include the scheme and port. -2. Add to `/etc/hosts`: +2. Add your domain to the hosts file: + **macOS/Linux:** Edit `/etc/hosts` + ```bash + sudo sh -c 'echo "127.0.0.1 local.example.com" >> /etc/hosts' ``` - 127.0.0.1 local.example.com + + **Windows (PowerShell as Administrator):** Edit `C:\Windows\System32\drivers\etc\hosts` + ```powershell + Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "127.0.0.1 local.example.com" ``` 3. Generate certificates (first time only): ```bash - docker-compose --profile setup run --rm mkcert + docker compose --profile setup run --rm mkcert ``` 4. Install the CA certificate (one-time): From 28845145686022c277bf0ef89a88e364b1b4d0b2 Mon Sep 17 00:00:00 2001 From: Aram Grigoryan <132480+aram356@users.noreply.github.com> Date: Thu, 15 Jan 2026 16:02:50 -0800 Subject: [PATCH 2/2] Formatting --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c8d24b0..40fd931 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,16 @@ A Dockerized Caddy reverse proxy with automatic SSL certificate generation for l 2. Add your domain to the hosts file: - **macOS/Linux:** Edit `/etc/hosts` + **macOS/Linux:** + Edit `/etc/hosts` + ```bash sudo sh -c 'echo "127.0.0.1 local.example.com" >> /etc/hosts' ``` - **Windows (PowerShell as Administrator):** Edit `C:\Windows\System32\drivers\etc\hosts` + **Windows (PowerShell as Administrator):** + Edit `C:\Windows\System32\drivers\etc\hosts` + ```powershell Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "127.0.0.1 local.example.com" ```