Keep source, config, and deploy files. Leave runtime data, uploads, and logs out of git. Co-authored-by: Cursor <cursoragent@cursor.com>
11 lines
288 B
Bash
11 lines
288 B
Bash
#!/bin/bash
|
|
# Prepare writable dirs, then hand off to the official Mongo entrypoint.
|
|
set -euo pipefail
|
|
|
|
mkdir -p /var/log/mongodb /data/db
|
|
if id mongodb >/dev/null 2>&1; then
|
|
chown mongodb:mongodb /var/log/mongodb /data/db
|
|
fi
|
|
|
|
exec docker-entrypoint.sh mongod --config /etc/mongod.conf
|