Files
maternal-app/ecosystem.config.js
Andrei 8ae42ffc75
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
chore: Remove production Docker infrastructure and reorganize docs
- Remove production Docker Compose files (docker-compose.production.yml, docker-compose.prod-simple.yml)
- Remove production Dockerfiles (backend and frontend)
- Move implementation docs to docs/implementation-docs/ directory
- Remove test scripts (test-embeddings.js, test-voice-*.js/sh)
- Update ecosystem.config.js with production environment variables (CORS, JWT secrets, database config)
- Add database connection pooling configuration
- Update CORS configuration for production domains (parentflowapp.com)
- Fix frontend dev server port configuration (3005)
- Add PWA web push implementation plan documentation
- Simplify health check endpoints (remove MongoDB/Redis specific checks)

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

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

87 lines
2.9 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,
DATABASE_HOST: 'localhost',
DATABASE_PORT: 5556,
DATABASE_NAME: 'parentflow_production',
DATABASE_USER: 'parentflow_user',
DATABASE_PASSWORD: 'parentflow_secure_password_2024',
DATABASE_SSL: 'false',
REDIS_HOST: 'localhost',
REDIS_PORT: 6667,
MONGODB_URI: 'mongodb://localhost:27778/parentflow_ai',
MINIO_ENDPOINT: 'localhost',
MINIO_PORT: 9004,
MINIO_USE_SSL: false,
MINIO_ACCESS_KEY: 'parentflow_minio',
MINIO_SECRET_KEY: 'parentflow_minio_secret_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',
},
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
},
],
};