ca-grow-ops-manager/.agent/workflows/deploy.md
fullsizemalt f8a368be62
Some checks failed
Deploy to Production / deploy (push) Failing after 0s
Test / backend-test (push) Failing after 0s
Test / frontend-test (push) Failing after 0s
feat: Layout Designer enhancements (#1)
- Added ability to create new Floors and properties directly in Layout Designer
- Implemented AddFloorModal
- Updated FloorSelector to support adding properties/floors
- Fixed missing capabilities in PropertySetup
- Resolved circular dependencies and duplicate imports
2025-12-11 11:31:07 -08:00

2.5 KiB

description
Deploy ca-grow-ops-manager to nexus-vector via Forgejo

Deploying CA Grow Ops Manager

Prerequisites

  • SSH access to nexus-vector (via Tailscale)
  • Forgejo accessible at https://git.runfoo.run
  • Deploy key authorized for the repository

Standard Deployment (CI/CD Automatic)

Pushing to main branch triggers automatic deployment via Forgejo Actions:

# From local machine
cd /Users/ten/ANTIGRAVITY/777wolfpack/ca-grow-ops-manager
git add -A
git commit -m "your commit message"
git push origin main

The CI/CD workflow will:

  1. Pull latest code on nexus-vector
  2. Rebuild containers
  3. Run database migrations
  4. Seed demo data (if needed)
  5. Restart services

Manual Deployment (When CI/CD Fails)

// turbo-all

1. SSH into nexus-vector

ssh nexus-vector

2. Navigate to project

cd /srv/containers/ca-grow-ops-manager

3. Pull latest code (use admin user for Forgejo access)

# If deploy key is set up:
sudo -u admin git pull origin main

# If that fails, use HTTPS with token:
git pull https://git.runfoo.run/malty/ca-grow-ops-manager.git main

4. Rebuild and deploy

docker compose build --no-cache
docker compose up -d db redis
sleep 5
docker compose run --rm backend npx prisma migrate deploy
docker compose run --rm backend node prisma/seed.js
docker compose up -d

5. Verify deployment

docker compose ps
curl -s http://localhost:8010/api/healthz

Troubleshooting

Forgejo 502 Error

Forgejo container may need restart:

cd /srv/containers/forgejo
docker compose restart forgejo

Git Permission Denied

Deploy key not authorized. Either:

  1. Add deploy key to repo in Forgejo UI (Settings > Deploy Keys)
  2. Use HTTPS with personal access token

SSH Host Key Changed

ssh-keygen -f ~/.ssh/known_hosts -R '[localhost]:2222'
ssh-keyscan -p 2222 localhost >> ~/.ssh/known_hosts

Useful Commands

# View logs
docker compose logs -f frontend
docker compose logs -f backend

# Check container health
docker compose ps

# Run database commands
docker compose exec db psql -U ca_grow_ops -d ca_grow_ops

# Restart specific service
docker compose restart backend

URLs