From 76e2642c6f5b70f1b40f21f6ab04c94375e0ad56 Mon Sep 17 00:00:00 2001 From: Karmaa Date: Tue, 11 Mar 2025 23:07:27 -0500 Subject: [PATCH] Changes to Dockerfile to fix error in installing MongoDB --- docker/entrypoint.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 89cc8aec..226a70ed 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -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..." -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) -sleep 5 - -# Start NGINX in the background -echo "Starting Nginx..." +# Start NGINX +echo "Starting NGINX..." nginx -g "daemon off;" & -# Start Node.js backend (adjust as needed for your backend setup) +# Start Node.js backend echo "Starting Node.js backend..." -node /usr/app/src/backend/ssh.cjs & -node /usr/app/src/backend/database.cjs & +node /app/src/backend/ssh.cjs & +node /app/src/backend/database.cjs & # Keep the container running wait \ No newline at end of file