deafmissoula-website/cline_docs/techContext.md

2.5 KiB

Technical Context

Technologies Used

  • Frontend:
    • React
    • TypeScript
    • Tailwind CSS
    • Framer Motion (animations)
  • Infrastructure:
    • Docker
    • Portainer
    • Gitea (version control)

Development Setup

  1. Source code:

    • Repository hosted on Gitea
    • TypeScript for type safety
    • React components in client/src/components/
  2. Build/Deploy:

    • Docker container
    • Portainer for container management
    • Automatic rebuilds on code changes

Technical Constraints

  1. File Management:

    • PDF files stored in client/public/minutes/
    • Static file serving for documents
  2. Browser Compatibility:

    • Desktop: PDF viewer in popup
    • Mobile: Direct PDF download
  3. Dependencies:

    • React for UI components
    • 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:

    ssh chaulmark@10.4.0.205 "docker inspect deafmissoulaorg-app-1 --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'"
    
  2. Update Caddyfile:

    # 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:

    ssh chaulmark@10.4.0.205 "docker exec caddy caddy reload --config /etc/caddy/Caddyfile"
    
  4. Verify:

    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.