You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -38,7 +38,7 @@ Copy the contents and use that as password / secret key. And run that again to g
38
38
39
39
## Input variables
40
40
41
-
The generator (Cookiecutter) will ask you for data on a long list of fields which will be used to populate variables across the project, customising it for you out the box. You might want to have these on hand before generating the project.
41
+
The generator (Cookiecutter) will ask you for data on a long list of fields which will be used to populate variables across the project, customising it for you out the box. **You might want to have these on hand before generating the project.**
42
42
43
43
The input variables, with their default values (some auto generated) are:
44
44
@@ -53,7 +53,7 @@ The input variables, with their default values (some auto generated) are:
53
53
-`secret_key`: Backend server secret key. Use the method above to generate it.
54
54
-`first_superuser`: The first superuser generated, with it you will be able to create more users, etc. By default, based on the domain.
55
55
-`first_superuser_password`: First superuser password. Use the method above to generate it.
56
-
-`backend_cors_origins`: Origins (domains, more or less) that are enabled for CORS (Cross Origin Resource Sharing). This allows a frontend in one domain (e.g. `https://dashboard.example.com`) to communicate with this backend, that could be living in another domain (e.g. `https://api.example.com`). It can also be used to allow your local frontend (with a custom `hosts` domain mapping, as described in the project's `README.md`) that could be living in `http://dev.example.com:8080` to communicate with the backend at `https://stag.example.com`. Notice the `http` vs `https` and the `dev.` prefix for local development vs the "staging" `stag.` prefix. By default, it includes origins for production, staging and development, with ports commonly used during local development by several popular frontend frameworks (Vue with `:8080`, React, Angular).
56
+
-`backend_cors_origins`: Origins (domains, more or less) that are enabled for CORS ([Cross Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)). This informs a frontend browser in one domain (e.g. `https://dashboard.example.com`) it can trust this backend, that could be living in another domain (e.g. `https://api.example.com`). It can also be used to allow your local frontend (with a custom `hosts` domain mapping, as described in the project's `README.md`) that could be living in `http://dev.example.com:8080` to communicate with the backend at `https://stag.example.com`. Notice the `http` vs `https` and the `dev.` prefix for local development vs the "staging" `stag.` prefix. By default, it includes origins for production, staging and development, with ports commonly used during local development by several popular frontend frameworks (Vue with `:8080`, React, Angular).
57
57
-`smtp_port`: Port to use to send emails via SMTP. By default `587`.
58
58
-`smtp_host`: Host to use to send emails, it would be given by your email provider, like Mailgun, Sparkpost, etc.
59
59
-`smtp_user`: The user to use in the SMTP connection. The value will be given by your email provider.
Copy file name to clipboardExpand all lines: docs/getting-started.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ This FastAPI, React, MongoDB repo will generate a complete web application stack
45
45
46
46
## Who is it for?
47
47
48
-
This project is a rock-solid foundation on which to build complex web applications which need parallel processing, scheduled event management, and a range of relational and graph database support. The base deployment requires about 2Gb of memory to run.
48
+
This project is a rock-solid foundation on which to build complex web applications which need parallel processing, scheduled event management, leveraging a NoSQL Datastore (MongoDB). The base deployment requires about 2Gb of memory to run.
49
49
50
50
This is **not** a light-weight system to deploy a blog or simple content-management-system.
51
51
@@ -83,9 +83,9 @@ Running Cookiecutter to customise the deployment with your settings, and then bu
83
83
84
84
### Setting up a Mongo Connection
85
85
86
-
A Mongo connection can be set up one of two ways: At the cookiecutter generation step, provide the `mongodb_uri`, and `mongo_database` to inform the generator on how to connect to an Atlas cloud instance. Additionally, in the generated file, you can manually set the .env.MONGO_DATABASE_URIand it will connect to the Atlas cluster made locally.
86
+
A Mongo connection can be set up one of two ways: At the cookiecutter generation step, provide the `mongodb_uri`, and `mongo_database` to inform the generator on how to connect to an Atlas cloud instance. Additionally, in the generated file, you can manually leave the `.env.MONGO_DATABASE_URI` as `mongodb`and it will automatically connect to the running mongodb docker instance.
87
87
88
-
Additionally, developers could configure a local mongo instance, but it would either have to be spun up in docker, or generated separately and also allow for non-localhost connections to be made.
88
+
Whilst the local instance is available, it is best advised to create or [connect to a MongoDB Atlas Cluster](https://www.mongodb.com/docs/atlas/tutorial/connect-to-your-cluster/).
89
89
90
90
### Deploying for production
91
91
@@ -105,7 +105,7 @@ After using this generator, your new project will contain an extensive `README.m
105
105
106
106
## Release Notes
107
107
108
-
### 0.1.0
108
+
### 2023.11.10
109
109
- Experimental release of FARM-stack generator app
Copy file name to clipboardExpand all lines: {{cookiecutter.project_slug}}/README.md
+7-5
Original file line number
Diff line number
Diff line change
@@ -44,16 +44,16 @@ If your Docker is not running in `localhost` (the URLs above wouldn't work) chec
44
44
**The backend and celery containers will fail to load if a proper Mongo URI is not configured**.
45
45
46
46
Please ensure that either
47
-
-`MONGO_(HOST|USER|PASSWORD|DATABASE)` were properly set in the initial MongoDB setup phase
48
-
-`MONGO_DATABASE_URI` has been set in `{{ cookiecutter.project_slug }}/.env`
47
+
-`MONGO_DATABASE` is properly set in the initial Cookiecutter setup phase.
48
+
-`MONGO_DATABASE_URI` has been set in `{{ cookiecutter.project_slug }}/.env`; leaving the initial value as `mongodb` will establish a connection to the docker instance of mongo created.
49
49
50
50
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/)
51
51
52
52
### Setting Up MongoDB Locally
53
53
54
-
**Currently, the FARM-stack generator does not provide a running `mongod` within the docker container**
54
+
The docker-compose file has a simple setup for a mongodb server to run in a docker container. It'll be exposed on port `27017` and reachable by setting the MONGO_DATABASE_URI to `mongodb`
55
55
56
-
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**
56
+
Since the intention of this generator is to work with scalable production environments very quickly, we provide a container of MongoDB, but**We do strongly advise you connect to an Atlas cluster**
57
57
58
58
To see how to use MongoDB with Docker, read through this article on [set-up steps](https://www.mongodb.com/compatibility/docker)
59
59
@@ -635,6 +635,8 @@ Github Actions is configured assuming 2 environments following Github flow:
635
635
636
636
If you need to add more environments, for example, you could imagine using a client-approved `preprod` branch, you can just copy the configurations in `actions.yml` for `stag` and rename the corresponding variables. The Docker Compose file and environment variables are configured to support as many environments as you need, so that you only need to modify `actions.yml` (or whichever CI system configuration you are using).
637
637
638
+
Support for the deployment to the desired host domain has been commented out as the functionality has not been tested by the MongoDB team. Feel free to uncomment and follow instructions for deployment steps at your own discretion.
639
+
638
640
## Docker Compose files and env vars
639
641
640
642
There is a main `docker-compose.yml` file with all the configurations that apply to the whole stack, it is used automatically by `docker-compose`.
@@ -773,7 +775,7 @@ This project was generated using https://github.com/mongodb-labs/full-stack-fast
Copy file name to clipboardExpand all lines: {{cookiecutter.project_slug}}/backend/app/README.md
+6-5
Original file line number
Diff line number
Diff line change
@@ -55,19 +55,20 @@ If your Docker is not running in `localhost` (the URLs above wouldn't work) chec
55
55
**The backend and celery containers will fail to load if a proper Mongo URI is not configured**.
56
56
57
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 `{{ cookiecutter.project_slug }}/.env`
58
+
-`MONGO_DATABASE` is properly set in the initial Cookiecutter setup phase.
59
+
-`MONGO_DATABASE_URI` has been set in `{{ cookiecutter.project_slug }}/.env`; leaving the initial value as `mongodb` will establish a connection to the docker instance of mongo created.
60
60
61
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
62
63
63
### Setting Up MongoDB Locally
64
64
65
-
**Currently, the FARM-stack generator does not provide a running `mongod` within the docker container**
65
+
The docker-compose file has a simple setup for a mongodb server to run in a docker container. It'll be exposed on port `27017` and reachable by setting the MONGO_DATABASE_URI to `mongodb`
66
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**
67
+
Since the intention of this generator is to work with scalable production environments very quickly, we provide a container of MongoDB, but**We do strongly advise you connect to an Atlas cluster**
68
68
69
69
To see how to use MongoDB with Docker, read through this article on [set-up steps](https://www.mongodb.com/compatibility/docker)
70
70
71
+
71
72
### General workflow
72
73
73
74
By default, the dependencies are managed with [Hatch](https://hatch.pypa.io/latest/), go there and install it.
@@ -782,7 +783,7 @@ This project was generated using https://github.com/tiangolo/full-stack-fastapi-
Copy file name to clipboardExpand all lines: {{cookiecutter.project_slug}}/frontend/app/content/about.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ Copy the contents and use that as password / secret key. And run that again to g
68
68
69
69
### Input variables
70
70
71
-
The generator (cookiecutter) will ask you for some data, you might want to have at hand before generating the project.
71
+
The generator (cookiecutter) will ask you for some data, **you might want to have at hand before generating the project.**
72
72
73
73
The input variables, with their default values (some auto generated) are:
74
74
@@ -85,7 +85,7 @@ The input variables, with their default values (some auto generated) are:
85
85
-`secret_key`: Backend server secret key. Use the method above to generate it.
86
86
-`first_superuser`: The first superuser generated, with it you will be able to create more users, etc. By default, based on the domain.
87
87
-`first_superuser_password`: First superuser password. Use the method above to generate it.
88
-
-`backend_cors_origins`: Origins (domains, more or less) that are enabled for CORS (Cross Origin Resource Sharing). This allows a frontend in one domain (e.g. `https://dashboard.example.com`) to communicate with this backend, that could be living in another domain (e.g. `https://api.example.com`). It can also be used to allow your local frontend (with a custom `hosts` domain mapping, as described in the project's `README.md`) that could be living in `http://dev.example.com:8080` to communicate with the backend at `https://stag.example.com`. Notice the `http` vs `https` and the `dev.` prefix for local development vs the "staging" `stag.` prefix. By default, it includes origins for production, staging and development, with ports commonly used during local development by several popular frontend frameworks (Vue with `:8080`, React, Angular).
88
+
-`backend_cors_origins`: Origins (domains, more or less) that are enabled for CORS ([Cross Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)). This informs a frontend browser in one domain (e.g. `https://dashboard.example.com`) it can trust this backend, that could be living in another domain (e.g. `https://api.example.com`). It can also be used to allow your local frontend (with a custom `hosts` domain mapping, as described in the project's `README.md`) that could be living in `http://dev.example.com:8080` to communicate with the backend at `https://stag.example.com`. Notice the `http` vs `https` and the `dev.` prefix for local development vs the "staging" `stag.` prefix. By default, it includes origins for production, staging and development, with ports commonly used during local development by several popular frontend frameworks (Vue with `:8080`, React, Angular).
89
89
-`smtp_port`: Port to use to send emails via SMTP. By default `587`.
90
90
-`smtp_host`: Host to use to send emails, it would be given by your email provider, like Mailgun, Sparkpost, etc.
91
91
-`smtp_user`: The user to use in the SMTP connection. The value will be given by your email provider.
0 commit comments