hudy9x / namviek

The open-source project manager for tiny teams
https://namviek.com
MIT License
1.79k stars 206 forks source link

Improve: adding mongodb service and update docker guide #210

Closed FranciscoJBrito closed 3 weeks ago

FranciscoJBrito commented 3 weeks ago

Improvements


Test cases


REF: #190

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **namviek-5o9o** | ⬜️ Ignored ([Inspect](https://vercel.com/hudys-projects/namviek-5o9o/Ea3stfKAqdUdq9PmWJKnwGTy69wP)) | [Visit Preview](https://namviek-5o9o-git-fork-franciscojbrito-imp-b26926-hudys-projects.vercel.app) | | Jun 13, 2024 4:00pm |
hudy9x commented 3 weeks ago

@namnn9x could you please review this pr ?

namnn9x commented 3 weeks ago

this ok,i will check it

hudy9x commented 3 weeks ago

@FranciscoJBrito , @namnn9x There's some testcases you guys are supposed to check before merging:

FranciscoJBrito commented 3 weeks ago

@hudy9x, @namnn9x I changed the frontend execution to production mode because the performance in development mode was terrible. On the other hand, separate the entry points for the backend and frontend.

hudy9x commented 3 weeks ago

@FranciscoJBrito it's looking good. @namnn9x Please help me to verify this pr. I've been reviewing your pr #202

namnn9x commented 3 weeks ago

@hudy9x @FranciscoJBrito I am implementing test. Please waitting

namnn9x commented 3 weeks ago

@FranciscoJBrito I cloned your code and I'm facing some issues. Here are my steps

hudy9x commented 3 weeks ago

Hmm, I think you forgot to mapping folder from real machine to docker. This was not an error if you've used WSL for running docker Try to run docker in WSL @namnn9x Besides, could you add a mapping volume for Windows users who not using WSL ? @FranciscoJBrito

It might be something like this I think

C:/Users/hp/Downloads:/data/
hudy9x commented 3 weeks ago

@FranciscoJBrito Your docker setup work well for me. I've just set this up and built successfully

image

However, there's a few small issues here:

1/ I think you should turn off logging for mongodb image. It's hard to review and detect errors, ...

2/ Build process is ok. But i can not log in or signup. Here is the error

Screenshot from 2024-06-12 21-29-05

3/ Could your please change the default port (Ex: 6379, 3000, 27017) to another ? (Ex: 6379 -> 6377, etc...)

Because it might be caused conflicts to running ports. Someone like me use 6379 for redis, so i'm supposed to turn of redis-server before running the docker It would be better to put these default port in another environment section (inside the docker-compose file), so anyone can change it as they want.

4/ About the setup guide. Due to I'm running v26.1.4 for docker and v2.27.1 for compose

It requires me to run a quite different commands. So if your version is greater than me or yours is the latest then the setup guide is ok. If not, please update it to match the latest version image

hudy9x commented 3 weeks ago

@FranciscoJBrito another note, Please ignore my previous comment about mapping folder here

For now, I think we should only support Windows with WSL turned on

FranciscoJBrito commented 3 weeks ago

@namnn9x @hudy9x I don't think this is a volume issue, do you have the .sh files inside the docker folder?

FranciscoJBrito commented 3 weeks ago

sorry guys, I selected the wrong auto workflow and ended up deleting the remote branch 😅, anyway I made some changes.

  1. @hudy9x the logs you were receiving were not from mongodb, they were from redis.
  2. If I change the default ports, some errors occur, anyway i directly add all the ports and variables in the docker-compose, they are configurable.
  3. I update the configuration guide, modifying the docker-compose commands to the correct version, which is docker compose.

P.S: Keep in mind that the variables configured in the .env.local can generate conflicts, it would be advisable for the MONGODB_URL and REDIS_HOST variables to be empty.

hudy9x commented 3 weeks ago

@FranciscoJBrito

I tried to build the image, Redis service work wells now Next I signed up a new account But i got some error as follows

"Kind: Server selection timeout: No available servers. Topology: { Type: ReplicaSetNoPrimary, Set Name: rs0, Max Set Version: 1, Max Election ID: 7fffffff0000000000000005, Servers: [ { Address: host.docker.internal:27017, Type: Unknown, Error: Kind: I/O error: failed to lookup address information: Name does not resolve, labels: {} } ] }, labels: {\"TransientTransactionError\"}"

Sound like the error from mongodb connection

image

FranciscoJBrito commented 3 weeks ago

@hudy9x got u, I added a modification to the mongodb url, try now please. If you made any port changes or something additional, let me know, on the other hand remember that the .env.local can interfere if the MONGODB_URL and REDIS_HOST variables have any value.

hudy9x commented 3 weeks ago

@FranciscoJBrito ok, I'm gonna try it now

hudy9x commented 3 weeks ago

well done @FranciscoJBrito work like a charm :))) and extremely fast Screenshot from 2024-06-13 23-29-53