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..40fd931 100644 --- a/README.md +++ b/README.md @@ -18,18 +18,29 @@ 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):