Skip to main content

MoneyMatcher Deployment Guide

Last Updated: December 4, 2025 Server: H100 (crella.ai infrastructure)


Architecture Overview

┌─────────────────────────────────────────────────────────────────────┐
│ H100 SERVER │
│ │
│ ┌─────────────────────┐ ┌─────────────────────────────┐ │
│ │ MONEYMATCHER │ │ CRELLA.AI │ │
│ │ ~/moneymatcher/ │ │ ~/crella-ai/ │ │
│ │ │ │ │ │
│ │ Docker Container │ │ Docker Compose Stack │ │
│ │ ├── Caddy │ │ ├── Caddy (reverse proxy) │ │
│ │ └── Vite Build │ │ ├── Frontend (:3000) │ │
│ │ │ │ ├── Backend (:8002) │ │
│ │ Port: 3001 │ │ └── Cortex (:8003) │ │
│ └─────────────────────┘ └─────────────────────────────┘ │
│ ↓ ↓ │
│ moneymatcher.ai crella.ai │
└─────────────────────────────────────────────────────────────────────┘

Service Locations

ServiceDirectoryInternal PortPublic URL
MoneyMatcher~/moneymatcher/3001moneymatcher.ai
Crella.ai Frontend~/crella-ai/3000crella.ai
Crella.ai Backend~/crella-ai/8002crella.ai/api
Cortex AI~/crella-ai/8003crella.ai/api/cortex

Deployment Commands

Deploy MoneyMatcher Updates

# SSH into H100
ssh user@h100-server

# Navigate to MoneyMatcher
cd ~/moneymatcher

# Pull latest changes
git pull origin feat/jason

# Rebuild and restart
docker-compose down
docker-compose build --no-cache
docker-compose up -d

# Verify it's running
docker-compose ps
docker-compose logs -f moneymatcher

Quick Restart (No Rebuild)

cd ~/moneymatcher
docker-compose restart

Full Rebuild (After Major Changes)

cd ~/moneymatcher
docker-compose down
docker-compose build --no-cache
docker-compose up -d

Troubleshooting

MoneyMatcher Down (502/504 Error)

# Check if container is running
cd ~/moneymatcher
docker-compose ps

# If stopped, start it
docker-compose up -d

# Check logs for errors
docker-compose logs --tail=50 moneymatcher

Routing Issues (Site Not Loading)

# Restart Caddy in crella-ai to refresh connections
cd ~/crella-ai
docker-compose restart caddy

# Verify Caddy config
docker-compose exec caddy caddy validate --config /etc/caddy/Caddyfile

White Screen / Build Errors

# Rebuild from scratch
cd ~/moneymatcher
docker-compose down
docker-compose build --no-cache
docker-compose up -d

# Check build output
docker-compose logs moneymatcher | grep -i error

Check Container Health

# View all containers
docker ps -a

# View MoneyMatcher specifically
docker-compose -f ~/moneymatcher/docker-compose.yml ps

# View resource usage
docker stats

Environment Variables

MoneyMatcher requires these env vars (set in .env.local or docker-compose):

GEMINI_API_KEY=xxx          # For AI features
GOOGLE_MAPS_API_KEY=xxx # For address autocomplete

Docker Configuration

Dockerfile (Multi-stage build)

# Stage 1: Build with Node 20
FROM node:20-alpine AS builder
# ... npm ci, npm run build

# Stage 2: Serve with Caddy
FROM caddy:2.8-alpine AS runner
COPY --from=builder /app/dist /srv
COPY caddy-internal.conf /etc/caddy/Caddyfile
EXPOSE 3000

docker-compose.yml

services:
moneymatcher:
build:
context: .
args:
- GEMINI_API_KEY=${GEMINI_API_KEY}
- GOOGLE_MAPS_API_KEY=${GOOGLE_MAPS_API_KEY}
ports:
- "3001:3000" # Host:Container
restart: unless-stopped

Caddy Config (SPA Routing)

:3000 {
root * /srv
file_server
try_files {path} /index.html # SPA fallback
}

Deployment Checklist

Before deploying:

  • All changes committed and pushed to feat/jason
  • Build tested locally (npm run build)
  • No TypeScript errors
  • Environment variables set on server

After deploying:

  • Container running (docker-compose ps)
  • Site loads at moneymatcher.ai
  • No console errors in browser
  • Key features working (login, demo video, chat)

Recent Deployments

DateVersionChangesDeployed By
Dec 4, 2025v2.6"From Wealth to Legacy" tagline, intro video, ultra-compact headerA(i) Team

Contact

For deployment issues:

  • Check this guide first
  • Review docker logs
  • Escalate to DevOps if containers won't start

This document is maintained alongside the MoneyMatcher codebase.