Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down