feat: Update all production configs for dedicated PostgreSQL server
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

- PostgreSQL now on dedicated server: 10.0.0.207:5432
- Database: parentflow (user: postgres, password: a3ppq)
- Removed PostgreSQL from docker-compose.production.yml
- Updated start-production.sh to check PostgreSQL connectivity
- Updated migration scripts to use dedicated server
- Created .env.admin.example for admin service configuration
- Updated admin dashboard docs with PostgreSQL details
- Redis, MongoDB, MinIO remain as Docker containers on 10.0.0.240

Infrastructure:
- Application Server: 10.0.0.240 (PM2 + Docker services)
- Database Server: 10.0.0.207 (PostgreSQL only)
- Admin Server: 10.0.0.241 (future deployment)
- Nginx Proxy: Separate server with SSL configured

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-06 21:39:28 +00:00
parent bfefb19100
commit e07aaa5016
4 changed files with 143 additions and 40 deletions

View File

@@ -1,26 +1,13 @@
version: '3.8'
# Production Docker Compose for ParentFlow
# PostgreSQL is on dedicated server: 10.0.0.207
# These services run on application server: 10.0.0.240
services:
postgres:
image: pgvector/pgvector:pg15
container_name: parentflow-postgres-prod
environment:
POSTGRES_DB: parentflow_production
POSTGRES_USER: parentflow_user
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-parentflow_secure_password_2024}
ports:
- "5432:5432"
volumes:
- postgres_prod_data:/var/lib/postgresql/data
- ./maternal-app/maternal-app-backend/src/database/migrations:/docker-entrypoint-initdb.d:ro
networks:
- parentflow-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U parentflow_user -d parentflow_production"]
interval: 10s
timeout: 5s
retries: 5
# PostgreSQL removed - using dedicated server
# Connection: postgresql://postgres:a3ppq@10.0.0.207:5432/parentflow
# Migrations should be run directly on the database server
redis:
image: redis:7-alpine
@@ -86,8 +73,6 @@ networks:
driver: bridge
volumes:
postgres_prod_data:
driver: local
redis_prod_data:
driver: local
mongodb_prod_data: