Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the INITIALIZE_DATA env var #18

Merged
merged 1 commit into from
Aug 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ Start strapi:
git clone https://github.com/rocketchat/RC4Community
cd cms
npm i
npm run develop
INITIALIZE_DATA=true npm run develop
```

Note the `INITIALIZE_DATA` environment variable is only needed the first time you startup the cms for development. It will seed the cms with a default set of components for you to start your own customization. (see [fetch data](https://github.com/RonLek/RC4Community/blob/master/cms/config/functions/fetchData.js) for the actual default initialization code)

The application is written on nextjs and deployable on all nextjs compatible CDN + microservices and scaled deployment platforms. For build and design, start it in a shell:

```
Expand All @@ -53,16 +55,6 @@ You can now have designers and devs modify the portal content directly and indep

Devs can now enjoy the hot refresh and rapid iterations of the nextjs dev environment.

**Easy CMS data sync during development**

A `fetchData.js` script has been written that can be used to **fetch and overwrite** local CMS data from an API endpoint. This script is executed on every Strapi server restart. To enable it start your Strapi CMS server with the `INITIALIZE_DATA` environment variable as follows:

```
cd cms
INITIALIZE_DATA=true npm run develop
```

Your Strapi CMS data should now be in-sync with the remotely stored CMS data.

## Application build time

Expand Down