version: '3.8' services: postgres: image: postgres:16-alpine container_name: zerp_postgres restart: unless-stopped environment: POSTGRES_DB: mind14_crm POSTGRES_USER: postgres POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres123} volumes: - postgres_data:/var/lib/postgresql/data ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 backend: build: context: ./backend dockerfile: Dockerfile container_name: zerp_backend restart: unless-stopped environment: PORT: 5001 NODE_ENV: production DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD:-postgres123}@postgres:5432/mind14_crm?schema=public JWT_SECRET: ${JWT_SECRET:-z-crm-jwt-secret-change-in-production-NOW} JWT_EXPIRES_IN: 7d JWT_REFRESH_EXPIRES_IN: 30d BCRYPT_ROUNDS: 10 CORS_ORIGIN: https://zerp.atmata-group.com,http://zerp.atmata-group.com,http://localhost:3000,http://37.60.249.71:3000 depends_on: postgres: condition: service_healthy ports: - "5001:5001" command: sh -c "npx prisma migrate deploy && node dist/server.js" frontend: build: context: ./frontend dockerfile: Dockerfile args: NEXT_PUBLIC_API_URL: https://zerp.atmata-group.com/api/v1 container_name: zerp_frontend restart: unless-stopped environment: NEXT_PUBLIC_API_URL: https://zerp.atmata-group.com/api/v1 depends_on: - backend ports: - "3000:3000" volumes: postgres_data: driver: local