chore: update MongoDB version to 4.4.18 for ARMv8 compatibility and adjust healthcheck command

- Changed MongoDB image from 7.0 to 4.4.18 to ensure compatibility with ARMv8.0.
- Updated healthcheck command to use 'mongo' instead of 'mongosh' as per version requirements.
This commit is contained in:
Omar Sánchez Pizarro
2026-01-20 03:31:34 +01:00
parent d28710b927
commit 1b25462375

View File

@@ -1,7 +1,8 @@
services:
# MongoDB para almacenar datos
# Usando versión 4.4.18 para compatibilidad con ARMv8.0 (ARMv8.2-A requerido desde 4.4.19+)
mongodb:
image: mongo:7.0
image: mongo:4.4.18
container_name: wallabicher-mongodb
ports:
- "27018:27017"
@@ -12,7 +13,8 @@ services:
- MONGO_INITDB_ROOT_PASSWORD=adminpassword
- MONGO_INITDB_DATABASE=wallabicher
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
# MongoDB 4.4.18 usa 'mongo' en lugar de 'mongosh' (mongosh se introdujo en 5.0+)
test: ["CMD", "mongo", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5