File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed
Expand file tree Collapse file tree 2 files changed +20
-9
lines changed 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,29 @@ 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:**
27+ Edit ` /etc/hosts `
28+
29+ ``` bash
30+ sudo sh -c ' echo "127.0.0.1 local.example.com" >> /etc/hosts'
2531 ```
26- 127.0.0.1 local.example.com
32+
33+ ** Windows (PowerShell as Administrator):**
34+ Edit ` C:\Windows\System32\drivers\etc\hosts `
35+
36+ ``` powershell
37+ Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "127.0.0.1 local.example.com"
2738 ```
2839
29403 . Generate certificates (first time only):
3041
3142 ``` bash
32- docker- compose --profile setup run --rm mkcert
43+ docker compose --profile setup run --rm mkcert
3344 ```
3445
35464 . Install the CA certificate (one-time):
You can’t perform that action at this time.
0 commit comments