everythings work fine but the mongodb fails on startup everytime.
log:
TypeScript
Generating random MongoDB keyfile...
/bin/bash: line 9: : No such file or directory
has something to do with this, but cannot really figure it out (from docs template):
TypeScript
entrypoint:
- /bin/bash
- -c
- |
set -e
KEYFILE_PATH="/data/keyfile/mongo-keyfile"
INIT_FLAG="/data/db/.mongodb_initialized"
# Generate keyfile if it doesn't exist
if [ ! -f "$KEYFILE_PATH" ]; then
echo "Generating random MongoDB keyfile..."
mkdir -p /data/keyfile
openssl rand -base64 756 > "$KEYFILE_PATH"
fi
chmod 400 "$KEYFILE_PATH"
chown mongodb:mongodb "$KEYFILE_PATH" 2>/dev/null || chown 999:999 "$KEYFILE_PATH"
TL;DR
Docker Compose MongoDB setup is failing on startup due to a missing directory for the MongoDB keyfile generation script. To fix this, ensure the directory structure is correct in the script and that the Docker volumes are properly mapped.Recommended threads
- [Self-hosted] Realtime crashes with "Mis...
- Regarding Rate Limits
Hello, I am a student engineer who built an internal website for my university club using AppWrite. My club currently has around 500 members, and when I recent...
- Problem adding domain onto the project a...
I have used 2 domains on the project HavanaDev (havanadev.pro and havanadev.com). .com was just redirected to . Pro domain. .pro is expired, now I’d like to use...