Add Caddy reverse proxy and Docker networking documentation to Memory Bank

This commit is contained in:
TheMaddax 2026-03-04 15:08:32 -07:00
parent 198e08c013
commit 60e698faa5

View file

@ -36,3 +36,60 @@
- TypeScript for type checking
- Framer Motion for animations
- Tailwind for styling
## Production Server Configuration (10.4.0.205)
### Caddy Reverse Proxy
- **Location:** `~/docker/caddy/config/Caddyfile`
- **Container Name:** `caddy`
- **Admin API:** `0.0.0.0:2019`
### DeafMissoula.org Configuration
- **Docker Container:** `deafmissoulaorg-app-1`
- **Internal Port:** 801
- **Docker Network:** Separate from Caddy (different network IDs)
- **Current IP:** 172.18.0.6 (as of March 4, 2026)
**Important:** Because Caddy and deafmissoula containers are on different Docker networks, the Caddyfile must use IP addresses instead of container names for routing.
### Caddyfile Entry:
```
deafmissoula.org {
reverse_proxy 172.18.0.6:801
}
```
### Common Issues & Solutions
#### Issue: Website returns 502 after Docker rebuild
**Cause:** Docker container IP address changed during rebuild
**Solution:**
1. Check current container IP:
```bash
ssh chaulmark@10.4.0.205 "docker inspect deafmissoulaorg-app-1 --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'"
```
2. Update Caddyfile:
```bash
# Download Caddyfile
scp chaulmark@10.4.0.205:~/docker/caddy/config/Caddyfile /tmp/Caddyfile
# Edit locally to update IP address in deafmissoula.org section
# Upload back
scp /tmp/Caddyfile chaulmark@10.4.0.205:~/docker/caddy/config/Caddyfile
```
3. Reload Caddy:
```bash
ssh chaulmark@10.4.0.205 "docker exec caddy caddy reload --config /etc/caddy/Caddyfile"
```
4. Verify:
```bash
curl -I https://deafmissoula.org
```
#### Better Long-term Solution
Connect both Caddy and deafmissoula containers to the same Docker network to use container names instead of IP addresses, which would prevent this issue.