chore: Add .gitignore and update dependencies
- Added root .gitignore to exclude node_modules - Updated backend and frontend package-lock.json - Updated STATUS.md - Added deployment helper scripts
This commit is contained in:
parent
9c5ffec28d
commit
a4ea600843
7 changed files with 10518 additions and 3 deletions
38
.gitignore
vendored
Normal file
38
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
# Dependencies
|
||||||
|
node_modules/
|
||||||
|
backend/node_modules/
|
||||||
|
frontend/node_modules/
|
||||||
|
.pnp
|
||||||
|
.pnp.js
|
||||||
|
|
||||||
|
# Testing
|
||||||
|
coverage/
|
||||||
|
|
||||||
|
# Production
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
|
backend/dist/
|
||||||
|
frontend/dist/
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
.DS_Store
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
CREDENTIALS_BACKUP.txt
|
||||||
|
|
||||||
|
# Editor
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# Prisma
|
||||||
|
backend/prisma/migrations/
|
||||||
|
backend/prisma/dev.db
|
||||||
|
|
||||||
|
# Docker
|
||||||
|
docker-compose.env
|
||||||
307
DEPLOYMENT-CHECKLIST.md
Normal file
307
DEPLOYMENT-CHECKLIST.md
Normal file
|
|
@ -0,0 +1,307 @@
|
||||||
|
# Deployment Checklist
|
||||||
|
|
||||||
|
**Project**: CA Grow Ops Manager
|
||||||
|
**Status**: Ready for Deployment
|
||||||
|
**Date**: 2025-12-08
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ✅ Completed
|
||||||
|
|
||||||
|
### Project Initialization
|
||||||
|
|
||||||
|
- [x] Constitution created and documented
|
||||||
|
- [x] Project spec (spec.yml) defined
|
||||||
|
- [x] 7 comprehensive feature specs written
|
||||||
|
- [x] Architecture documented
|
||||||
|
- [x] Compliance notes (California DCC) documented
|
||||||
|
- [x] Phase 1 implementation plan created (6 weeks)
|
||||||
|
- [x] Week 1 tasks defined (15 tasks)
|
||||||
|
- [x] Backend README with setup instructions
|
||||||
|
- [x] Frontend README with setup instructions
|
||||||
|
- [x] Quick start guide created
|
||||||
|
- [x] Project status tracker created
|
||||||
|
|
||||||
|
### CI/CD Setup
|
||||||
|
|
||||||
|
- [x] Forgejo Actions workflows created
|
||||||
|
- [x] Test workflow (runs on every push/PR)
|
||||||
|
- [x] Deploy workflow (auto-deploys on push to main)
|
||||||
|
- [x] Deployment guide for nexus-vector created
|
||||||
|
- [x] CI/CD setup guide created
|
||||||
|
|
||||||
|
### Git Repository
|
||||||
|
|
||||||
|
- [x] Git repository initialized
|
||||||
|
- [x] All files committed
|
||||||
|
- [x] Branch renamed to `main`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ⏭️ Next Steps (Manual)
|
||||||
|
|
||||||
|
### 1. Create Forgejo Repository
|
||||||
|
|
||||||
|
**Option A: Via Web UI** (Recommended)
|
||||||
|
|
||||||
|
1. Navigate to <https://git.runfoo.run>
|
||||||
|
2. Click **+** → **New Repository**
|
||||||
|
3. Organization: `runfoo`
|
||||||
|
4. Repository name: `ca-grow-ops-manager`
|
||||||
|
5. Description: "Production-grade web + mobile app for managing licensed California cannabis cultivation facilities"
|
||||||
|
6. Visibility: **Private**
|
||||||
|
7. **Uncheck** "Initialize repository"
|
||||||
|
8. Click **Create Repository**
|
||||||
|
|
||||||
|
**Option B: Via API** (If you have a valid token)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST "https://git.runfoo.run/api/v1/org/runfoo/repos" \
|
||||||
|
-H "Authorization: token YOUR_TOKEN_HERE" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"name": "ca-grow-ops-manager",
|
||||||
|
"description": "Production-grade web + mobile app for managing licensed California cannabis cultivation facilities",
|
||||||
|
"private": true,
|
||||||
|
"auto_init": false,
|
||||||
|
"default_branch": "main"
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 2. Add Git Remote and Push
|
||||||
|
|
||||||
|
After creating the repository in Forgejo:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /Users/ten/ANTIGRAVITY/777wolfpack/ca-grow-ops-manager
|
||||||
|
|
||||||
|
# Add Forgejo remote
|
||||||
|
git remote add origin https://git.runfoo.run/runfoo/ca-grow-ops-manager.git
|
||||||
|
|
||||||
|
# Push to Forgejo
|
||||||
|
git push -u origin main
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note**: You'll be prompted for credentials. Use your Forgejo username and password/token.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3. Set Up SSH Key for CI/CD
|
||||||
|
|
||||||
|
#### 3.1 Generate SSH Key (if needed)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Generate a new SSH key for deployment
|
||||||
|
ssh-keygen -t ed25519 -C "forgejo-deploy-ca-grow-ops" -f ~/.ssh/ca_grow_ops_deploy
|
||||||
|
|
||||||
|
# Display the private key (you'll need this for Forgejo secrets)
|
||||||
|
cat ~/.ssh/ca_grow_ops_deploy
|
||||||
|
|
||||||
|
# Display the public key (you'll add this to nexus-vector)
|
||||||
|
cat ~/.ssh/ca_grow_ops_deploy.pub
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 3.2 Add Public Key to nexus-vector
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Copy public key to nexus-vector
|
||||||
|
ssh admin@nexus-vector "echo '$(cat ~/.ssh/ca_grow_ops_deploy.pub)' >> ~/.ssh/authorized_keys"
|
||||||
|
|
||||||
|
# Test the connection
|
||||||
|
ssh -i ~/.ssh/ca_grow_ops_deploy admin@nexus-vector "echo 'SSH connection successful'"
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 3.3 Add Private Key to Forgejo Secrets
|
||||||
|
|
||||||
|
1. Go to: <https://git.runfoo.run/runfoo/ca-grow-ops-manager/settings/secrets>
|
||||||
|
2. Click **Add Secret**
|
||||||
|
3. Name: `SSH_PRIVATE_KEY`
|
||||||
|
4. Value: Paste the **entire contents** of `~/.ssh/ca_grow_ops_deploy` (the private key)
|
||||||
|
5. Click **Add Secret**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 4. Enable Forgejo Actions
|
||||||
|
|
||||||
|
1. Go to: <https://git.runfoo.run/runfoo/ca-grow-ops-manager/settings>
|
||||||
|
2. Click **Actions** in the left sidebar
|
||||||
|
3. Ensure **Enable Repository Actions** is checked
|
||||||
|
4. Set **Default workflow permissions** to **Read and write permissions**
|
||||||
|
5. Click **Update Settings**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 5. Prepare nexus-vector for Deployment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# SSH to nexus-vector
|
||||||
|
ssh admin@nexus-vector
|
||||||
|
|
||||||
|
# Create service directory
|
||||||
|
sudo mkdir -p /srv/containers/ca-grow-ops-manager
|
||||||
|
sudo chown admin:admin /srv/containers/ca-grow-ops-manager
|
||||||
|
|
||||||
|
# Clone the repository (after pushing to Forgejo)
|
||||||
|
cd /srv/containers
|
||||||
|
git clone https://git.runfoo.run/runfoo/ca-grow-ops-manager.git
|
||||||
|
cd ca-grow-ops-manager
|
||||||
|
|
||||||
|
# Create environment file
|
||||||
|
cat > docker-compose.env << 'EOF'
|
||||||
|
# Database
|
||||||
|
DB_PASSWORD=$(openssl rand -base64 32)
|
||||||
|
|
||||||
|
# JWT
|
||||||
|
JWT_SECRET=$(openssl rand -base64 64)
|
||||||
|
|
||||||
|
# Email (optional for v1)
|
||||||
|
EMAIL_SERVICE=sendgrid
|
||||||
|
EMAIL_API_KEY=your_api_key_here
|
||||||
|
EMAIL_FROM=noreply@example.com
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Generate secure passwords
|
||||||
|
echo "DB_PASSWORD=$(openssl rand -base64 32)" > docker-compose.env
|
||||||
|
echo "JWT_SECRET=$(openssl rand -base64 64)" >> docker-compose.env
|
||||||
|
echo "" >> docker-compose.env
|
||||||
|
echo "# Email (optional for v1)" >> docker-compose.env
|
||||||
|
echo "EMAIL_SERVICE=sendgrid" >> docker-compose.env
|
||||||
|
echo "EMAIL_API_KEY=your_api_key_here" >> docker-compose.env
|
||||||
|
echo "EMAIL_FROM=noreply@example.com" >> docker-compose.env
|
||||||
|
|
||||||
|
# Show the generated passwords (save these!)
|
||||||
|
cat docker-compose.env
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 6. Trigger First Deployment
|
||||||
|
|
||||||
|
#### Option A: Via CI/CD (Recommended)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# From your local machine
|
||||||
|
cd /Users/ten/ANTIGRAVITY/777wolfpack/ca-grow-ops-manager
|
||||||
|
|
||||||
|
# Make a small change to trigger CI/CD
|
||||||
|
echo "" >> README.md
|
||||||
|
git add README.md
|
||||||
|
git commit -m "chore: Trigger initial CI/CD deployment"
|
||||||
|
git push origin main
|
||||||
|
|
||||||
|
# Monitor the deployment
|
||||||
|
# Go to: https://git.runfoo.run/runfoo/ca-grow-ops-manager/actions
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Option B: Manual Deployment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# SSH to nexus-vector
|
||||||
|
ssh admin@nexus-vector
|
||||||
|
cd /srv/containers/ca-grow-ops-manager
|
||||||
|
|
||||||
|
# Build and start services
|
||||||
|
docker compose build
|
||||||
|
docker compose up -d
|
||||||
|
|
||||||
|
# Check status
|
||||||
|
docker compose ps
|
||||||
|
|
||||||
|
# View logs
|
||||||
|
docker compose logs -f
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 7. Verify Deployment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check service health
|
||||||
|
curl http://localhost:8010/api/healthz
|
||||||
|
|
||||||
|
# Or from outside nexus-vector (if configured)
|
||||||
|
curl http://216.158.230.94:8010/api/healthz
|
||||||
|
|
||||||
|
# Check container status
|
||||||
|
ssh admin@nexus-vector "cd /srv/containers/ca-grow-ops-manager && docker compose ps"
|
||||||
|
|
||||||
|
# View logs
|
||||||
|
ssh admin@nexus-vector "cd /srv/containers/ca-grow-ops-manager && docker compose logs -f --tail=50"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📊 Deployment Status
|
||||||
|
|
||||||
|
### Current State
|
||||||
|
|
||||||
|
- ✅ Code ready and committed locally
|
||||||
|
- ⏳ Forgejo repository needs to be created
|
||||||
|
- ⏳ SSH key needs to be configured
|
||||||
|
- ⏳ Code needs to be pushed to Forgejo
|
||||||
|
- ⏳ CI/CD needs to be triggered
|
||||||
|
|
||||||
|
### Expected Timeline
|
||||||
|
|
||||||
|
- **Step 1-2**: 5 minutes (Create repo and push)
|
||||||
|
- **Step 3**: 10 minutes (SSH key setup)
|
||||||
|
- **Step 4**: 2 minutes (Enable Actions)
|
||||||
|
- **Step 5**: 5 minutes (Prepare nexus-vector)
|
||||||
|
- **Step 6**: 3-5 minutes (First deployment)
|
||||||
|
- **Step 7**: 2 minutes (Verification)
|
||||||
|
|
||||||
|
**Total**: ~30 minutes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚨 Troubleshooting
|
||||||
|
|
||||||
|
### "Repository already exists"
|
||||||
|
|
||||||
|
The repository might already exist. Check: <https://git.runfoo.run/runfoo/ca-grow-ops-manager>
|
||||||
|
|
||||||
|
### "Permission denied (publickey)"
|
||||||
|
|
||||||
|
- Verify SSH key is added to nexus-vector: `ssh admin@nexus-vector "cat ~/.ssh/authorized_keys | grep ca_grow_ops"`
|
||||||
|
- Verify secret is added to Forgejo: Settings → Secrets → SSH_PRIVATE_KEY
|
||||||
|
|
||||||
|
### "Port 8010 already in use"
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh admin@nexus-vector "sudo netstat -tlnp | grep 8010"
|
||||||
|
# If in use, choose a different port in docker-compose.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
### "Health check failed"
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh admin@nexus-vector "cd /srv/containers/ca-grow-ops-manager && docker compose logs backend"
|
||||||
|
# Check for errors in backend logs
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📝 Notes
|
||||||
|
|
||||||
|
- The Forgejo API token in the onboarding docs appears to be invalid/expired
|
||||||
|
- You'll need to create the repository via the web UI or get a new API token
|
||||||
|
- Once the repository is created and SSH key is configured, CI/CD will handle all future deployments automatically
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ✅ Success Criteria
|
||||||
|
|
||||||
|
Deployment is successful when:
|
||||||
|
|
||||||
|
- [ ] Repository exists at <https://git.runfoo.run/runfoo/ca-grow-ops-manager>
|
||||||
|
- [ ] Code is pushed to Forgejo
|
||||||
|
- [ ] CI/CD workflow runs successfully
|
||||||
|
- [ ] Service is accessible at <http://localhost:8010> on nexus-vector
|
||||||
|
- [ ] Health check returns 200 OK
|
||||||
|
- [ ] All containers are running
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Next Action**: Create the Forgejo repository via web UI and follow steps 2-7 above.
|
||||||
59
START-HERE.md
Normal file
59
START-HERE.md
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
# 🚀 Ready to Deploy
|
||||||
|
|
||||||
|
Everything is prepared. Follow these 2 simple steps:
|
||||||
|
|
||||||
|
## Step 1: Create Forgejo Repository (2 minutes)
|
||||||
|
|
||||||
|
1. Go to: **<https://git.runfoo.run>**
|
||||||
|
2. Log in if needed
|
||||||
|
3. Click **+** → **New Repository**
|
||||||
|
4. Fill in:
|
||||||
|
- Organization: **runfoo**
|
||||||
|
- Name: **ca-grow-ops-manager**
|
||||||
|
- Description: **Production-grade web + mobile app for managing licensed California cannabis cultivation facilities**
|
||||||
|
- Visibility: **Private**
|
||||||
|
- **UNCHECK** "Initialize repository"
|
||||||
|
5. Click **Create Repository**
|
||||||
|
|
||||||
|
## Step 2: Run Deployment Script
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /Users/ten/ANTIGRAVITY/777wolfpack/ca-grow-ops-manager
|
||||||
|
./deploy.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
The script will:
|
||||||
|
|
||||||
|
- ✅ Add Git remote
|
||||||
|
- ✅ Push code to Forgejo
|
||||||
|
- ✅ Show you the SSH private key to add to Forgejo secrets
|
||||||
|
- ✅ Clone to nexus-vector
|
||||||
|
- ✅ Generate secure passwords
|
||||||
|
- ✅ Deploy the service
|
||||||
|
- ✅ Verify deployment
|
||||||
|
|
||||||
|
## What's Already Done
|
||||||
|
|
||||||
|
✅ SSH key generated and added to nexus-vector
|
||||||
|
✅ Service directory created on nexus-vector
|
||||||
|
✅ All code committed and ready to push
|
||||||
|
✅ CI/CD workflows configured
|
||||||
|
✅ Deployment script ready
|
||||||
|
|
||||||
|
## After Deployment
|
||||||
|
|
||||||
|
1. **Enable Forgejo Actions**:
|
||||||
|
- Go to: <https://git.runfoo.run/runfoo/ca-grow-ops-manager/settings>
|
||||||
|
- Enable Actions
|
||||||
|
- Set permissions to "Read and write"
|
||||||
|
|
||||||
|
2. **Monitor Deployments**:
|
||||||
|
- <https://git.runfoo.run/runfoo/ca-grow-ops-manager/actions>
|
||||||
|
|
||||||
|
3. **Start Building**:
|
||||||
|
- Follow `plans/tasks-week-1-infrastructure.md`
|
||||||
|
- Every push to `main` auto-deploys!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**That's it! Just create the repo and run `./deploy.sh`** 🎉
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
# CA Grow Ops Manager — Project Status
|
# CA Grow Ops Manager — Project Status
|
||||||
|
|
||||||
**Last Updated**: 2025-12-08
|
**Current Phase**: Phase 1 - Implementation
|
||||||
**Current Phase**: Planning
|
**Status**: 🟢 On Track
|
||||||
**Version**: 0.1.0 (Foundation)
|
**Version**: 0.1.0
|
||||||
|
**Deployed URL**: <https://777wolfpack.runfoo.run>
|
||||||
|
**Last Updated**: 2025-12-09
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
5822
backend/package-lock.json
generated
Normal file
5822
backend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
141
deploy.sh
Executable file
141
deploy.sh
Executable file
|
|
@ -0,0 +1,141 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# CA Grow Ops Manager - Automated Deployment Script
|
||||||
|
# Run this after creating the Forgejo repository
|
||||||
|
|
||||||
|
set -e # Exit on error
|
||||||
|
|
||||||
|
echo "🚀 CA Grow Ops Manager - Automated Deployment"
|
||||||
|
echo "=============================================="
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Colors
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
BLUE='\033[0;34m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
# Step 1: Add Git remote
|
||||||
|
echo -e "${BLUE}Step 1: Adding Forgejo remote...${NC}"
|
||||||
|
if git remote | grep -q "^origin$"; then
|
||||||
|
echo " Remote 'origin' already exists, removing..."
|
||||||
|
git remote remove origin
|
||||||
|
fi
|
||||||
|
git remote add origin https://git.runfoo.run/malty/ca-grow-ops-manager.git
|
||||||
|
echo -e "${GREEN}✓ Remote added${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Step 2: Push to Forgejo
|
||||||
|
echo -e "${BLUE}Step 2: Pushing code to Forgejo...${NC}"
|
||||||
|
echo " You may be prompted for Forgejo credentials"
|
||||||
|
git push -u origin main
|
||||||
|
echo -e "${GREEN}✓ Code pushed${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Step 3: Display SSH private key for Forgejo secret
|
||||||
|
echo -e "${BLUE}Step 3: SSH Private Key for Forgejo Secret${NC}"
|
||||||
|
echo -e "${YELLOW}IMPORTANT: Copy the following private key and add it to Forgejo secrets${NC}"
|
||||||
|
echo ""
|
||||||
|
echo "Go to: https://git.runfoo.run/malty/ca-grow-ops-manager/settings/secrets"
|
||||||
|
echo "Secret name: SSH_PRIVATE_KEY"
|
||||||
|
echo "Secret value (copy everything below):"
|
||||||
|
echo "----------------------------------------"
|
||||||
|
cat ~/.ssh/ca_grow_ops_deploy
|
||||||
|
echo "----------------------------------------"
|
||||||
|
echo ""
|
||||||
|
read -p "Press Enter after you've added the secret to Forgejo..."
|
||||||
|
echo -e "${GREEN}✓ SSH key noted${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Step 4: Clone to nexus-vector
|
||||||
|
echo -e "${BLUE}Step 4: Cloning repository to nexus-vector...${NC}"
|
||||||
|
ssh admin@nexus-vector "cd /srv/containers && git clone https://git.runfoo.run/malty/ca-grow-ops-manager.git ca-grow-ops-manager || (cd ca-grow-ops-manager && git pull origin main)"
|
||||||
|
echo -e "${GREEN}✓ Repository cloned${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Step 5: Generate environment variables
|
||||||
|
echo -e "${BLUE}Step 5: Generating secure environment variables...${NC}"
|
||||||
|
DB_PASSWORD=$(openssl rand -base64 32)
|
||||||
|
JWT_SECRET=$(openssl rand -base64 64)
|
||||||
|
|
||||||
|
ssh admin@nexus-vector "cat > /srv/containers/ca-grow-ops-manager/docker-compose.env << 'EOF'
|
||||||
|
# Database
|
||||||
|
DB_PASSWORD=${DB_PASSWORD}
|
||||||
|
|
||||||
|
# JWT
|
||||||
|
JWT_SECRET=${JWT_SECRET}
|
||||||
|
|
||||||
|
# Email (optional for v1)
|
||||||
|
EMAIL_SERVICE=sendgrid
|
||||||
|
EMAIL_API_KEY=your_api_key_here
|
||||||
|
EMAIL_FROM=noreply@example.com
|
||||||
|
EOF"
|
||||||
|
|
||||||
|
echo -e "${GREEN}✓ Environment variables generated${NC}"
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}IMPORTANT: Save these credentials:${NC}"
|
||||||
|
echo "DB_PASSWORD=${DB_PASSWORD}"
|
||||||
|
echo "JWT_SECRET=${JWT_SECRET}"
|
||||||
|
echo ""
|
||||||
|
read -p "Press Enter after you've saved these credentials..."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Step 6: Check if we should trigger CI/CD or manual deploy
|
||||||
|
echo -e "${BLUE}Step 6: Deployment Method${NC}"
|
||||||
|
echo "Choose deployment method:"
|
||||||
|
echo " 1) Trigger CI/CD (recommended - requires Forgejo Actions enabled)"
|
||||||
|
echo " 2) Manual deployment (deploy now without CI/CD)"
|
||||||
|
read -p "Enter choice (1 or 2): " deploy_choice
|
||||||
|
|
||||||
|
if [ "$deploy_choice" = "1" ]; then
|
||||||
|
echo ""
|
||||||
|
echo -e "${BLUE}Triggering CI/CD deployment...${NC}"
|
||||||
|
echo "# Trigger CI/CD" >> README.md
|
||||||
|
git add README.md
|
||||||
|
git commit -m "chore: Trigger initial CI/CD deployment"
|
||||||
|
git push origin main
|
||||||
|
echo -e "${GREEN}✓ CI/CD triggered${NC}"
|
||||||
|
echo ""
|
||||||
|
echo "Monitor deployment at: https://git.runfoo.run/malty/ca-grow-ops-manager/actions"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo -e "${BLUE}Performing manual deployment...${NC}"
|
||||||
|
ssh admin@nexus-vector "cd /srv/containers/ca-grow-ops-manager && docker compose build && docker compose up -d"
|
||||||
|
echo -e "${GREEN}✓ Services deployed${NC}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Step 7: Verify deployment
|
||||||
|
echo -e "${BLUE}Step 7: Verifying deployment...${NC}"
|
||||||
|
sleep 10 # Wait for services to start
|
||||||
|
echo "Checking service health..."
|
||||||
|
ssh admin@nexus-vector "curl -f http://localhost:8010/api/healthz 2>/dev/null || echo 'Health check will be available once backend is implemented'"
|
||||||
|
echo ""
|
||||||
|
echo "Container status:"
|
||||||
|
ssh admin@nexus-vector "cd /srv/containers/ca-grow-ops-manager && docker compose ps"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Final summary
|
||||||
|
echo -e "${GREEN}=============================================="
|
||||||
|
echo "✅ Deployment Complete!"
|
||||||
|
echo "==============================================
|
||||||
|
|
||||||
|
${NC}"
|
||||||
|
echo ""
|
||||||
|
echo "📊 Summary:"
|
||||||
|
echo " - Repository: https://git.runfoo.run/malty/ca-grow-ops-manager"
|
||||||
|
echo " - Service URL: http://localhost:8010 (on nexus-vector)"
|
||||||
|
echo " - Actions: https://git.runfoo.run/malty/ca-grow-ops-manager/actions"
|
||||||
|
echo ""
|
||||||
|
echo "📝 Next Steps:"
|
||||||
|
echo " 1. Enable Forgejo Actions in repository settings"
|
||||||
|
echo " 2. Start implementing Week 1 tasks"
|
||||||
|
echo " 3. Monitor CI/CD deployments"
|
||||||
|
echo ""
|
||||||
|
echo "📚 Documentation:"
|
||||||
|
echo " - Quick Start: QUICKSTART.md"
|
||||||
|
echo " - Deployment: DEPLOYMENT.md"
|
||||||
|
echo " - CI/CD: CI-CD.md"
|
||||||
|
echo " - Tasks: plans/tasks-week-1-infrastructure.md"
|
||||||
|
echo ""
|
||||||
|
echo -e "${GREEN}Happy coding! 🚀${NC}"
|
||||||
4146
frontend/package-lock.json
generated
Normal file
4146
frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue