Conversation
sristy17
left a comment
There was a problem hiding this comment.
Great job, @AritraDey-Dev! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project.
We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our contributing guidelines
No I have tested the required things on my side after running docker compose. |
will see but it is crashing from my side while reviewing |
There was a problem hiding this comment.
If you're creating docker-compose.yaml then we don't need DockerFile
There was a problem hiding this comment.
no we will still need it,otherwise it cann't build the docker image right.
There was a problem hiding this comment.
No, it's nothing like that, both serve different use cases. The application is just one Node.js app with MongoDB and we don’t need to manage multiple containers or configurations separately, we can indeed just use a single Dockerfile for this. That's why I mentioned either use one. I'd suggest to go with Dockerfile
We will be running a single container (Node.js app + MongoDB), you can have the MongoDB container running directly using docker run as we have the connection handled directly within your Node.js app. Why to create a separate instance for MongoDB again.? Just go ahead with Dockerfile
There was a problem hiding this comment.
Yeah how the repo is set up,your idea is correct I will just make a single dockerfile.
There was a problem hiding this comment.
You are already provided with creds for DB, you shouldn't hardcode it. If you wanna pass them them do it with env in docker-compose.
There was a problem hiding this comment.
No like if we do docker compose up,then the db url will be mongodb://MindDrive:MindDrive@mongo:27017/dev-db?authSource=admin but if we look at db.conf.js file,it is taking the db url from there.
`export const DB_USER = process.env.DB_USER;
export const DB_PASSWORD = process.env.DB_PASSWORD;
export const DB_APPNAME = process.env.DB_APPNAME;
export const MONGODB_URI = mongodb+srv://${DB_USER}:${DB_PASSWORD}@dev-db.3tzynec.mongodb.net/?retryWrites=true&w=majority&appName=${DB_APPNAME};so when ever the user dodocker compose up -d ` it is not taking docker mogno db url it is taking from the db.conf file.So it will go down.
so i implemented it like this if someone mention NODE_ENV(which is not the case when you are doing docker compose) then it will take docker db url.Or if you are using set up like...
npm install followed by npm run dev in that case you have to add NODE_ENV in your .env.So that fixes the issue.Actually most of the cases we keep our db url in our .env which is not the case in this codebase.
I hope it helps.

There was a problem hiding this comment.
No like if we do docker compose up,then the db url will be
mongodb://MindDrive:MindDrive@mongo:27017/dev-db?authSource=adminbut if we look at db.conf.js file,it is taking the db url from there. `export const DB_USER = process.env.DB_USER; export const DB_PASSWORD = process.env.DB_PASSWORD; export const DB_APPNAME = process.env.DB_APPNAME;export const MONGODB_URI =
mongodb+srv://${DB_USER}:${DB_PASSWORD}@dev-db.3tzynec.mongodb.net/?retryWrites=true&w=majority&appName=${DB_APPNAME};so when ever the user dodocker compose up -d ` it is not taking docker mogno db url it is taking from the db.conf file.So it will go down.so i implemented it like this if someone mention
NODE_ENV(which is not the case when you are doing docker compose) then it will take docker db url.Or if you are using set up like...npm installfollowed bynpm run devin that case you have to addNODE_ENVin your .env.So that fixes the issue.Actually most of the cases we keep our db url in our .env which is not the case in this codebase. I hope it helps.
@pooranjoyb what is your idea on this?
There was a problem hiding this comment.
Here also you dont need to hardcode it. jsut pass the ENV while running the image. Check Docker Variables for reference.
There was a problem hiding this comment.
Remove unnecessary LOC or formatting.
docker-compose.yml
Outdated
| restart: always | ||
| ports: | ||
| - "27017:27017" | ||
| environment: |
There was a problem hiding this comment.
these shouldn't be hardcoded. but should be passed as the environment vars.
|
squash all commits in 1 commit. @AritraDey-Dev |
be8da9d to
488ee78
Compare
|
@pooranjoyb Here are the things we need to do for docker setup.
|
LGTM 👍🏼 |
a96cbbb to
4a86011
Compare
README.md
Outdated
|
|
||
| GEMINI_API_ENDPOINT=https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContent | ||
| GEMINI_API_KEY=<gemini-api-key> | ||
| NODE_ENV=development |
|
Squash the commits in 1. @AritraDey-Dev |
d027bf0 to
5ef262d
Compare
yes done. |
|
|
Screencast.from.2025-02-19.00-11-03.webm |
@pooranjoyb can you check try to update docker in your system if docker login doesn't work. |
Yes that was docker cache that was creating the issue. anyways, docker is working fine now. jsut had few issues. the auth is failing and that leads to app crash. |
|
Screencast from 2025-02-19 23-08-24.webm |
|
@pooranjoyb also can you check whether it's able to connect to the db as sometimes in docker this issue is pretty regular. |
|
@pooranjoyb any update on this? |
|
Will update accordingly. You can proceed with other issues if any. |
|
@pooranjoyb @sristy17 any update regarding this PR? Can this be merged? |






Fixes Issue #103
Changes proposed
Set up the project using one single command(docker compose up -d --build)
Check List (Check all the applicable boxes)
Screenshots