Changes to Dockerfile to fix error in installing MongoDB

This commit is contained in:
Karmaa
2025-03-11 22:58:11 -05:00
parent d43190c5c1
commit 121b7775c0
2 changed files with 24 additions and 49 deletions

View File

@@ -2,7 +2,7 @@
# Start MongoDB in the background
echo "Starting MongoDB..."
mongod --fork --logpath /var/log/mongodb.log --bind_ip 0.0.0.0 --dbpath /data/db
mongod --fork --logpath /var/log/mongodb/mongod.log --bind_ip 0.0.0.0 --dbpath /data/db
# Wait for MongoDB to fully start (you can adjust the sleep if needed)
sleep 5
@@ -13,8 +13,8 @@ nginx -g "daemon off;" &
# Start Node.js backend (adjust as needed for your backend setup)
echo "Starting Node.js backend..."
node /app/src/backend/ssh.cjs &
node /app/src/backend/database.cjs &
node /usr/app/src/backend/ssh.cjs &
node /usr/app/src/backend/database.cjs &
# Keep the container running
wait