Attempt #3 to auto compile MongoDB into the build to exclude it from the compose.

This commit is contained in:
Karmaa
2025-03-16 13:18:53 -05:00
parent 89a123f36c
commit 0a5138f7ca
2 changed files with 20 additions and 5 deletions

View File

@@ -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