Operations Overview
This section contains operational setup guides for running and maintaining the platform infrastructure.
Setup Guides
- pnpm Installation on Ubuntu — How to install pnpm on Ubuntu 22.04 servers
- Puppeteer in Monorepo — Setting up Puppeteer correctly in a pnpm monorepo
- EC2 Server Setup — Full step-by-step guide to provisioning and configuring an Ubuntu EC2 instance for the backend
Common Operations
Deploying the Backend
bash
# Normal redeploy (zero-downtime)
pnpm deploy:backend
# First deploy or ecosystem config changed
pnpm deploy:backend:freshChecking Backend Health
bash
# SSH into EC2
pm2 status # PM2 process status
pm2 logs prod-logistech --lines 50 # Recent logsRestarting nginx
bash
sudo systemctl restart nginx
sudo nginx -t # Test nginx config before restartSSL Certificate Renewal
Certbot auto-renews certificates. To check or manually renew:
bash
sudo certbot renew --dry-run # Test renewal
sudo certbot renew # Force renewDatabase Backups
MongoDB backups should be scheduled via mongodump or Atlas automated backups:
bash
mongodump --uri="$MONGODB_URI" --out=/backups/$(date +%Y%m%d)