services: postgres: image: postgres:16-alpine container_name: pms_postgres restart: always environment: POSTGRES_USER: ${POSTGRES_USER:-admin} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password123} POSTGRES_DB: ${POSTGRES_DB:-userdb} volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-admin} -d ${POSTGRES_DB:-userdb}"] interval: 5s timeout: 5s retries: 5 mongo: image: mongo:7-jammy container_name: pms_mongo restart: always volumes: - mongodata:/data/db healthcheck: test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine container_name: pms_redis restart: always command: ["redis-server", "--save", "60", "1", "--appendonly", "yes"] volumes: - redisdata:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 user-service: build: context: ./user-service dockerfile: Dockerfile container_name: pms_user_service restart: always environment: - DATABASE_URL=postgresql://${POSTGRES_USER:-admin}:${POSTGRES_PASSWORD:-password123}@postgres:5432/${POSTGRES_DB:-userdb} - JWT_SECRET=${JWT_SECRET:-dev_secret} - PORT=3001 - NODE_ENV=production depends_on: postgres: condition: service_healthy team-service: build: context: ./team-service dockerfile: Dockerfile container_name: pms_team_service restart: always environment: - MONGO_URI=mongodb://mongo:27017/teamdb - REDIS_HOST=redis - REDIS_PORT=6379 - JWT_SECRET=${JWT_SECRET:-dev_secret} - PORT=3002 - NODE_ENV=production depends_on: mongo: condition: service_healthy redis: condition: service_healthy task-service: build: context: ./task-service dockerfile: Dockerfile container_name: pms_task_service restart: always environment: - MONGO_URI=mongodb://mongo:27017/taskdb - REDIS_HOST=redis - REDIS_PORT=6379 - JWT_SECRET=${JWT_SECRET:-dev_secret} - PORT=3003 - STORAGE_DRIVER=${STORAGE_DRIVER:-local} - GCS_BUCKET_NAME=${GCS_BUCKET_NAME:-projectify-attachments-storage} - GCP_PROJECT_ID=${GCP_PROJECT_ID:-projectify-483418} - NODE_ENV=production depends_on: mongo: condition: service_healthy redis: condition: service_healthy notification-service: build: context: ./notification-service dockerfile: Dockerfile container_name: pms_notification_service restart: always environment: - MONGO_URI=mongodb://mongo:27017/notificationdb - REDIS_HOST=redis - REDIS_PORT=6379 - JWT_SECRET=${JWT_SECRET:-dev_secret} - PORT=3004 - NODE_ENV=production depends_on: mongo: condition: service_healthy redis: condition: service_healthy frontend: build: context: ./frontend dockerfile: Dockerfile container_name: pms_frontend restart: always nginx: image: nginx:alpine container_name: pms_gateway restart: always ports: - "80:80" volumes: - ./nginx/conf.d:/etc/nginx/conf.d:ro depends_on: - frontend - user-service - team-service - task-service - notification-service volumes: pgdata: mongodata: redisdata: