weseek / growi

:anchor: GROWI - Team collaboration software using markdown
https://growi.org
MIT License
1.32k stars 220 forks source link

Using a remote mongodb (e.g., Mongo DB atlas) #3498

Closed jinhojang6 closed 3 years ago

jinhojang6 commented 3 years ago

Hey, thank you for maintaining this awesome open source project.

I have 2 questions regarding making use of a remote SaaS mongodb instead of hosting the DB locally.

  1. How can I connect to a remote MongoDB database(e.g., MongoDB atlas)?

    • I replaced mongoUri with mongodb+srv://{ID}:{PASSWORD}@~~~~~~ in config/migrate.js but it didn't work.
  2. If I start launching growi with the docker-compose repo, how can I develop it? It just fetch docker image so I cannot find the code.

Looking forward to hearing from you soon,

yuki-takei commented 3 years ago

@jinhojang6

How can I connect to a remote MongoDB database(e.g., MongoDB atlas)?

Don't edit config/migrate.js, set the env var MONGO_URI instead.

refs: https://docs.growi.org/en/admin-guide/admin-cookbook/env-vars.html

  1. If I start launching growi with the docker-compose repo, how can I develop it? It just fetch docker image so I cannot find the code.

Developers guide is here. If you would like to use custom docker image, build with this Dockerfile and put it to your registry, and pull your image with weseek/growi-docker-compose.