- Clone the repository.
- Run
npm ci
to install dependencies. - All needed environment variables are listed in the .env.example file. To automatically set them fill in a
.env
file following the same structure as the example file.
cp .env.example .env
- Run app in development mode (
npm run dev
).
We use scripted migrations for CMS model changes. Use DatoCMS's scripted migrations guide, to add a migration script and test it.
Once your PR is ready to merge, we have to apply the migrations to DatoCMS's main environment. Follow the following script on your branch, before merging:
- Turn on maintenance mode in DatoCMS
- Apply migrations to a fresh sandbox
- Run
npx datocms migrations:run --destination=<env-name>-deploy --api-token=<token>
to create a fresh fork of the primary environment with the new migrations applied. We use the-deploy
suffix so it's clear it's a deployment environment. - Fill in the required content. Make sure to not enter dummy content, as this environment will go to production!
- Run
- Commit the updated constants.mjs, containing your new environment
- Merge the PR
- Await the production deploy to succeed
- Promote the new environment in DatoCMS
- Turn off maintenance mode
- Once you've made sure everything is in order, you can remove your deploy sandbox environment. Be aware that you forfeit the option to rollback by performing this action.
Key decisions that are made during the course of the project are documented in docs/decision-log/. Please read the log so you understand why decisions are made and document key decisions when you make them.