Spaces:
Runtime error
Runtime error
Update entrypoint.sh.template
Browse files- 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 |
|