# DBIS Core Deployment - Source Code Deployment Required ## Current Status All infrastructure and containers are ready, but **source code deployment is incomplete** because the GitHub repository requires authentication. ## ✅ What's Complete 1. **All 6 containers created and running**: - PostgreSQL Primary (10100) - Database configured ✅ - PostgreSQL Replica (10101) - Container ready ✅ - Redis (10120) - Running ✅ - API Primary (10150) - Node.js installed ✅ - API Secondary (10151) - Node.js installed ✅ - Frontend (10130) - Node.js and Nginx installed ✅ 2. **Node.js 18.20.8 installed** via nvm in all application containers 3. **Git installed** in all containers 4. **Systemd service files** created for API containers 5. **Nginx configured** for frontend 6. **All deployment scripts** ready and available ## ⚠️ What's Needed **Source code must be deployed** to each container. The repository `git@github.com:Order-of-Hospitallers/dbis_core.git` requires authentication. ## Solutions ### Solution 1: Run Deployment Scripts (Once Git Auth is Configured) The deployment scripts will handle everything automatically: ```bash ssh root@192.168.11.10 "cd /root/proxmox/dbis_core/scripts/deployment && ./deploy-all.sh" ``` **Prerequisites**: Set up SSH keys for git access first (see Solution 2). ### Solution 2: Set Up Git SSH Authentication Configure SSH keys on containers to allow git clone: ```bash # Generate SSH key on each container for vmid in 10150 10151 10130; do ssh root@192.168.11.10 "pct exec $vmid -- bash -c 'ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N \"\" -C \"dbis-core-$vmid\" && cat ~/.ssh/id_ed25519.pub'" done # Add each public key to GitHub (deploy keys or user SSH keys) # Then test clone: ssh root@192.168.11.10 "pct exec 10150 -- bash -c 'GIT_SSH_COMMAND=\"ssh -o StrictHostKeyChecking=no\" git clone git@github.com:Order-of-Hospitallers/dbis_core.git /opt/dbis-core'" ``` ### Solution 3: Use Personal Access Token (HTTPS) If you prefer HTTPS with a token: ```bash # On each container, clone with token ssh root@192.168.11.10 "pct exec 10150 -- bash -c 'git clone https://YOUR_TOKEN@github.com/Order-of-Hospitallers/dbis_core.git /opt/dbis-core'" ``` ### Solution 4: Copy Source from Local Machine If you have the source code locally, copy it directly: ```bash # Create tar archive locally cd /home/intlc/projects/proxmox tar czf /tmp/dbis_source.tar.gz dbis_core/src dbis_core/package.json dbis_core/prisma dbis_core/frontend --exclude=node_modules --exclude=dist # Copy to each container for vmid in 10150 10151 10130; do scp /tmp/dbis_source.tar.gz root@192.168.11.10:/tmp/ ssh root@192.168.11.10 "pct push $vmid /tmp/dbis_source.tar.gz /tmp/dbis_source.tar.gz && pct exec $vmid -- bash -c 'cd /opt && rm -rf dbis-core && mkdir -p dbis-core && tar xzf /tmp/dbis_source.tar.gz -C dbis-core && rm /tmp/dbis_source.tar.gz'" done ``` ## After Source Code is Deployed Once source code is in `/opt/dbis-core` on each container: ### For API Containers (10150, 10151): ```bash ssh root@192.168.11.10 "pct exec 10150 -- bash -c ' source /root/.nvm/nvm.sh cd /opt/dbis-core npm install npx prisma generate npm run build # Create .env file cat > .env < .env <