Attempt #3 to auto compile MongoDB into the build to exclude it from the compose.
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Start MongoDB
|
||||
mongod --fork --logpath /var/log/mongodb.log
|
||||
mongod --fork --dbpath $MONGODB_DATA_DIR --logpath $MONGODB_LOG_DIR/mongodb.log
|
||||
|
||||
# Wait for MongoDB to be ready
|
||||
echo "Waiting for MongoDB to start..."
|
||||
until mongo --eval "print(\"waited for connection\")" > /dev/null 2>&1; do
|
||||
sleep 0.5
|
||||
done
|
||||
echo "MongoDB has started"
|
||||
|
||||
# Start nginx
|
||||
nginx
|
||||
@@ -13,4 +20,4 @@ node src/backend/ssh.cjs &
|
||||
node src/backend/database.cjs &
|
||||
|
||||
# Keep the container running and show MongoDB logs
|
||||
tail -f /var/log/mongodb.log
|
||||
tail -f $MONGODB_LOG_DIR/mongodb.log
|
||||
Reference in New Issue
Block a user