Skip to content

Commit dac889b

Browse files
committed
added the setting up local mongodb into the backend/app/app/README.md
1 parent 699990a commit dac889b

File tree

1 file changed

+18
-0
lines changed
  • {{cookiecutter.project_slug}}/backend/app

1 file changed

+18
-0
lines changed

{{cookiecutter.project_slug}}/backend/app/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,24 @@ If your Docker is not running in `localhost` (the URLs above wouldn't work) chec
5050

5151
## Backend local development, additional details
5252

53+
### Setting Up MongoDB
54+
55+
**The backend and celery containers will fail to load if a proper Mongo URI is not configured**.
56+
57+
Please ensure that either
58+
- `MONGO_(HOST|USER|PASSWORD|DATABASE)` were properly set in the initial MongoDB setup phase
59+
- `MONGO_DATABASE_URI` has been set in `{{ cookiebutter.project_slug }}/.env`
60+
61+
To learn more about how to generate a MongoDB URI please look at the docs on [Connecting to your MongoDB Atlas Clutser](https://www.mongodb.com/docs/atlas/tutorial/connect-to-your-cluster/)
62+
63+
### Setting Up MongoDB Locally
64+
65+
**Currently, the FARM-stack generator does not provide a running `mongod` within the docker container**
66+
67+
If running a local instance of MongoDB outside of a docker container that you want your backend to communicate with, you will need to set up [port forwarding in your docker config](https://docs.docker.com/desktop/networking/#use-cases-and-workarounds). Since the intention of this generator is to work with scalable production environments very quickly, providing a local container of MongoDB was not part of the initial charter in its creation. **We do strongly advise you connect to an Atlas cluster**
68+
69+
To see how to use MongoDB with Docker, read through this article on [set-up steps](https://www.mongodb.com/compatibility/docker)
70+
5371
### General workflow
5472

5573
By default, the dependencies are managed with [Hatch](https://hatch.pypa.io/latest/), go there and install it.

0 commit comments

Comments
 (0)