update yml

This commit is contained in:
berkay 2025-04-19 19:27:39 +03:00
parent f86e76adc3
commit 95e9c97913
1 changed files with 4 additions and 1 deletions

View File

@ -16,7 +16,8 @@ services:
- ./keyfile:/data/keyfile:ro # Add this for replica set auth
ports:
- "27017:27017" # Expose MongoDB port to external machines
command: ["--auth", "--bind_ip_all", "--keyFile", "/data/keyfile", "--replSet", "rs0"]
# Use a simpler configuration without replica set for now
command: ["--auth", "--bind_ip_all"]
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/admin --quiet
interval: 10s
@ -45,6 +46,8 @@ services:
- ME_CONFIG_MONGODB_ADMINPASSWORD=${MONGO_ROOT_PASSWORD:-password}
- ME_CONFIG_MONGODB_SERVER=mongodb # This should match container_name of MongoDB
- ME_CONFIG_MONGODB_AUTH_DATABASE=admin
# Fix connection string format
- ME_CONFIG_MONGODB_URL=mongodb://${MONGO_ROOT_USERNAME:-admin}:${MONGO_ROOT_PASSWORD:-password}@mongodb:27017/?authSource=admin
- ME_CONFIG_BASICAUTH_USERNAME=${MONGOEXPRESS_USERNAME:-mexpress}
- ME_CONFIG_BASICAUTH_PASSWORD=${MONGOEXPRESS_PASSWORD:-mexpress}
- ME_CONFIG_MONGODB_ENABLE_ADMIN=true