abazoge commited on
Commit
77e4970
1 Parent(s): 9a57da7

Update entrypoint.sh.template

Browse files
Files changed (1) hide show
  1. entrypoint.sh.template +5 -0
entrypoint.sh.template CHANGED
@@ -1,5 +1,10 @@
1
  #!/bin/bash
2
 
 
 
 
 
 
3
  # Start the local Mongo database
4
  mongod &
5
 
 
1
  #!/bin/bash
2
 
3
+ # Make sure `/data/db` directory exists even with persistent storage
4
+ mkdir -p /data/db
5
+ # If app crashed, mongo didn't stop gracefully. Remove all the old *.lock files
6
+ find /data/db -name "*.lock" -type f -exec rm -f {} \;
7
+
8
  # Start the local Mongo database
9
  mongod &
10