File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,19 +16,19 @@ A Caddy-based reverse proxy for local development with automatic SSL certificate
1616
1717``` bash
1818# Generate certificates (first time only)
19- docker- compose --profile setup run --rm mkcert
19+ docker compose --profile setup run --rm mkcert
2020
2121# Start the proxy
22- docker- compose up -d --build
22+ docker compose up -d --build
2323
2424# View logs
25- docker- compose logs -f caddy
25+ docker compose logs -f caddy
2626
2727# Stop the proxy
28- docker- compose down
28+ docker compose down
2929
3030# Regenerate certificates
31- rm -rf certs/* && docker- compose --profile setup run --rm mkcert
31+ rm -rf certs/* && docker compose --profile setup run --rm mkcert
3232
3333# Install CA on macOS
3434sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ./certs/${DOMAIN} .rootCA.pem
Original file line number Diff line number Diff line change @@ -18,18 +18,25 @@ A Dockerized Caddy reverse proxy with automatic SSL certificate generation for l
1818 UPSTREAM_URL=http://host.docker.internal:3000
1919 ```
2020
21- ` UPSTREAM_URL ` must include the scheme and port.
21+ > [ !WARNING]
22+ > ` UPSTREAM_URL ` must include the scheme and port.
2223
23- 2 . Add to ` /etc/ hosts` :
24+ 2 . Add your domain to the hosts file :
2425
26+ ** macOS/Linux:** Edit ` /etc/hosts `
27+ ``` bash
28+ sudo sh -c ' echo "127.0.0.1 local.example.com" >> /etc/hosts'
2529 ```
26- 127.0.0.1 local.example.com
30+
31+ ** Windows (PowerShell as Administrator):** Edit ` C:\Windows\System32\drivers\etc\hosts `
32+ ``` powershell
33+ Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "127.0.0.1 local.example.com"
2734 ```
2835
29363 . Generate certificates (first time only):
3037
3138 ``` bash
32- docker- compose --profile setup run --rm mkcert
39+ docker compose --profile setup run --rm mkcert
3340 ```
3441
35424 . Install the CA certificate (one-time):
You can’t perform that action at this time.
0 commit comments