Files
maternal-app/ecosystem.config.js
Andrei bfefb19100
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
docs: Update production deployment with actual infrastructure details
- PostgreSQL on dedicated server: 10.0.0.207 (postgres:a3ppq@10.0.0.207:5432/parentflow)
- Application server: 10.0.0.240 with SSH access (root/a3pq5t50yA@#)
- Nginx and SSL already configured on dedicated proxy server
- Updated ecosystem.config.js with production database credentials
- Updated .env.production.example with correct server details
- Redis, MongoDB, MinIO remain as Docker containers on 10.0.0.240

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 21:36:52 +00:00

99 lines
3.4 KiB
JavaScript

module.exports = {
apps: [
{
name: 'parentflow-backend-prod',
cwd: './maternal-app/maternal-app-backend',
script: 'dist/main.js',
instances: 2,
exec_mode: 'cluster',
autorestart: true,
watch: false,
max_memory_restart: '500M',
env: {
NODE_ENV: 'production',
API_PORT: 3020,
PORT: 3020,
// Dedicated PostgreSQL Server
DATABASE_HOST: '10.0.0.207',
DATABASE_PORT: 5432,
DATABASE_NAME: 'parentflow',
DATABASE_USER: 'postgres',
DATABASE_PASSWORD: 'a3ppq',
DATABASE_SSL: 'false',
// Redis Docker on 10.0.0.240
REDIS_HOST: 'localhost',
REDIS_PORT: 6379,
REDIS_PASSWORD: 'parentflow_redis_password_2024',
// MongoDB Docker on 10.0.0.240
MONGODB_URI: 'mongodb://parentflow_admin:parentflow_mongo_password_2024@localhost:27017/parentflow_ai_chat?authSource=admin',
// MinIO Docker on 10.0.0.240
MINIO_ENDPOINT: 'localhost',
MINIO_PORT: 9000,
MINIO_USE_SSL: false,
MINIO_ACCESS_KEY: 'parentflow_minio_admin',
MINIO_SECRET_KEY: 'parentflow_minio_password_2024',
JWT_SECRET: '0OEe+ml/g8/w1LVUwOuot5EeqADcZXnu9eATnTEU91Ji4KL8A8rhN42e1TT0s4ksir/5OJkk5/mwW4VzMcHpaA==',
JWT_REFRESH_SECRET: 'txk+0Olbuh0EPJd3Qq+zGfr+2ip6NtEHiq6iUDD/omBjt3ABO4ou7U/m9CgI4A8UlEU6cZmFkicdOB/QU+Og2g==',
CORS_ORIGIN: 'https://web.parentflowapp.com,https://api.parentflowapp.com,http://localhost:3030,http://localhost:3005',
},
env_production: {
NODE_ENV: 'production',
API_PORT: 3020,
PORT: 3020,
API_URL: 'https://api.parentflowapp.com',
CORS_ORIGIN: 'https://web.parentflowapp.com,https://api.parentflowapp.com,http://localhost:3030,http://localhost:3005',
// Dedicated PostgreSQL Server
DATABASE_HOST: '10.0.0.207',
DATABASE_PORT: 5432,
DATABASE_NAME: 'parentflow',
DATABASE_USER: 'postgres',
DATABASE_PASSWORD: 'a3ppq',
DATABASE_SSL: 'false',
},
error_file: './logs/backend-error.log',
out_file: './logs/backend-out.log',
log_file: './logs/backend-combined.log',
time: true,
merge_logs: true,
node_args: '--max-old-space-size=512',
kill_timeout: 5000,
wait_ready: true,
listen_timeout: 10000
},
{
name: 'parentflow-frontend-prod',
cwd: './maternal-web',
script: 'node_modules/next/dist/bin/next',
args: 'start',
instances: 1,
exec_mode: 'cluster',
autorestart: true,
watch: false,
max_memory_restart: '400M',
env: {
NODE_ENV: 'production',
PORT: 3030,
NEXT_PUBLIC_API_URL: 'https://api.parentflowapp.com',
},
env_production: {
NODE_ENV: 'production',
PORT: 3030,
NEXT_PUBLIC_API_URL: 'https://api.parentflowapp.com',
NEXT_PUBLIC_GRAPHQL_URL: 'https://api.parentflowapp.com/graphql',
NEXT_PUBLIC_WS_URL: 'wss://api.parentflowapp.com/ws',
NEXT_PUBLIC_APP_NAME: 'ParentFlow',
NEXT_PUBLIC_APP_URL: 'https://web.parentflowapp.com',
},
error_file: './logs/frontend-error.log',
out_file: './logs/frontend-out.log',
log_file: './logs/frontend-combined.log',
time: true,
merge_logs: true,
node_args: '--max-old-space-size=400',
kill_timeout: 5000,
wait_ready: true,
listen_timeout: 30000
},
],
};