Browse Source

add repair step, remove nojournal directive

Charles Reid 1 year ago
parent
commit
d0bd4ddf4a
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      scripts/first_run.sh

+ 4
- 1
scripts/first_run.sh View File

@@ -10,8 +10,11 @@ else
10 10
     ROLE=${MONGODB_ROLE:-dbAdminAnyDatabase}
11 11
 fi
12 12
 
13
+# Repair database
14
+/usr/bin/mongod --repair --dbpath /data
15
+
13 16
 # Start MongoDB service
14
-/usr/bin/mongod --dbpath /data --nojournal &
17
+/usr/bin/mongod --dbpath /data &
15 18
 while ! nc -vz localhost 27017; do sleep 1; done
16 19
 
17 20
 # Create User