feat: Complete production deployment pipeline with admin dashboard
Some checks failed
ParentFlow CI/CD Pipeline / Backend Tests (push) Has been cancelled
ParentFlow CI/CD Pipeline / Frontend Tests (push) Has been cancelled
ParentFlow CI/CD Pipeline / Security Scanning (push) Has been cancelled
ParentFlow CI/CD Pipeline / Build Docker Images (map[context:maternal-app/maternal-app-backend dockerfile:Dockerfile.production name:backend]) (push) Has been cancelled
ParentFlow CI/CD Pipeline / Build Docker Images (map[context:maternal-web dockerfile:Dockerfile.production name:frontend]) (push) Has been cancelled
ParentFlow CI/CD Pipeline / Deploy to Development (push) Has been cancelled
ParentFlow CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled

- Add unified deployment script with Node.js 22 installation
- Create comprehensive database migration script (28 migrations + admin tables)
- Add production start/stop scripts for all services
- Integrate admin dashboard (parentflow-admin) into PM2 ecosystem
- Configure all services: Backend (3020), Frontend (3030), Admin (3335)
- Update ecosystem.config.js with admin dashboard configuration
- Add invite codes module for user registration management
This commit is contained in:
2025-10-06 22:43:28 +00:00
parent 560fd22023
commit 4e19b992df
37 changed files with 6767 additions and 675 deletions

View File

@@ -94,5 +94,41 @@ module.exports = {
wait_ready: true,
listen_timeout: 30000
},
{
name: 'parentflow-admin-prod',
cwd: './parentflow-admin',
script: 'node_modules/next/dist/bin/next',
args: 'start',
instances: 1,
exec_mode: 'fork',
autorestart: true,
watch: false,
max_memory_restart: '300M',
env: {
NODE_ENV: 'production',
PORT: 3335,
HOSTNAME: '0.0.0.0',
NEXT_PUBLIC_API_URL: 'https://api.parentflowapp.com/api/v1',
NEXT_PUBLIC_APP_URL: 'https://adminpf.parentflowapp.com',
NEXT_PUBLIC_APP_NAME: 'ParentFlow Admin',
},
env_production: {
NODE_ENV: 'production',
PORT: 3335,
HOSTNAME: '0.0.0.0',
NEXT_PUBLIC_API_URL: 'https://api.parentflowapp.com/api/v1',
NEXT_PUBLIC_APP_URL: 'https://adminpf.parentflowapp.com',
NEXT_PUBLIC_APP_NAME: 'ParentFlow Admin',
},
error_file: './logs/admin-error.log',
out_file: './logs/admin-out.log',
log_file: './logs/admin-combined.log',
time: true,
merge_logs: true,
node_args: '--max-old-space-size=300',
kill_timeout: 5000,
wait_ready: true,
listen_timeout: 30000
},
],
};