services: # Development MongoDB with memory optimizations mongodb: image: mongo:8.3.4 container_name: buildpath-mongodb ports: - "27017:27017" environment: MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER:-root} MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASS:-password} GLIBC_TUNABLES: glibc.pthread.rseq=1 volumes: - ./data/db:/data/db # Reduced cache size to leave more RAM for the import script # WiredTiger cache is now 2GB (was 4GB) to prevent OOM during large imports command: mongod --wiredTigerCacheSizeGB 2 --quiet deploy: resources: limits: memory: 4G reservations: memory: 2G mongo-express: image: mongo-express ports: - "8081:8081" environment: ME_CONFIG_MONGODB_SERVER: mongodb ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_USER:-root} ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_PASS:-password} ME_CONFIG_BASICAUTH_USERNAME: admin ME_CONFIG_BASICAUTH_PASSWORD: admin123 depends_on: mongodb: condition: service_healthy