gabrielmbmb HF staff commited on
Commit
0bf7d94
1 Parent(s): 0fd5f18

Add removing multiple mongo *.lock files

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