Changes to Dockerfile to fix error in installing MongoDB
This commit is contained in:
@@ -1,20 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
# Start MongoDB in the background
|
# Start MongoDB (it should already be running from the mongo:5 container)
|
||||||
echo "Starting MongoDB..."
|
echo "Starting MongoDB..."
|
||||||
mongod --fork --logpath /var/log/mongodb/mongod.log --bind_ip 0.0.0.0 --dbpath /data/db
|
# MongoDB will run in a separate container, no need to start it here.
|
||||||
|
|
||||||
# Wait for MongoDB to fully start (you can adjust the sleep if needed)
|
# Start NGINX
|
||||||
sleep 5
|
echo "Starting NGINX..."
|
||||||
|
|
||||||
# Start NGINX in the background
|
|
||||||
echo "Starting Nginx..."
|
|
||||||
nginx -g "daemon off;" &
|
nginx -g "daemon off;" &
|
||||||
|
|
||||||
# Start Node.js backend (adjust as needed for your backend setup)
|
# Start Node.js backend
|
||||||
echo "Starting Node.js backend..."
|
echo "Starting Node.js backend..."
|
||||||
node /usr/app/src/backend/ssh.cjs &
|
node /app/src/backend/ssh.cjs &
|
||||||
node /usr/app/src/backend/database.cjs &
|
node /app/src/backend/database.cjs &
|
||||||
|
|
||||||
# Keep the container running
|
# Keep the container running
|
||||||
wait
|
wait
|
||||||
Reference in New Issue
Block a user