- Hosted on Netlify. See Deployment for info.
- Based on the Gatsby Starter Business.
- Node 16 NPM 8
- Gatsby CLI:
npm install -g [email protected] - Netlify CLI:
npm install -g netlify-cli npm install- Setup Netlify deployment:
netlify linkand choose 'Use current git remote origin'.
Overture.bio requires NPM v^8.3.0, to ensure all dependencies are installed correctly
# If you need to update your NPM version first, use the following command:
npm i -g npmnpm start
Check your QA builds locally! (See Environments)
- Deploy to a Netlify draft URL for QA:
npm run deploy - Deploy to https://overture.bio: Merge a PR into the main branch.
Gatsby has two environments: development (runs a dev server with hot reloading) and production (creates a static build in the ~/public folder).
Gatsby development and production builds are significantly different, so consider running npm run qa (prod build) occasionally to check for issues, and before deploying to QA.
- Development
- Feature flags ON
- Command:
npm run dev - Secrets and settings file:
.env.development
- QA (check your build before creating a Netlify link for QA)
- Feature flags ON
- Command:
npm run qa - Secrets file:
.env.production(overridden bynetlify.toml) (ignored by git) - Settings file:
netlify.toml,branch-deploycontext
- Production (check your build before deploying to https://overture.bio)
- Feature flags OFF
- Command:
npm run prod - Secrets file:
.env.production(overridden bynetlify.toml) (ignored by git) - Settings file:
netlify.toml,production&deploy-previewcontexts
These environments only apply when deploying to Netlify. The non-secret settings are stored in netlify.toml.
production: The live site at https://overture.bio, deployed automatically by Netlify when a PR is merged into the main branch.deploy-preview: Netlify deploys that are automatically generated when there is a PR created/updated on the main branch.branch-deploy: Other branches and PRs, deployed manually.
- Feature flags in Gatsby must be environment variables.
- Environment variables accessed in client-side code must be prefixed with
GATSBY_. - Example: Show something in development and hide it in production:
FLAG="true"in.env.developmentand Netlifybranch-deploycontext innetlify.toml.FLAG="false"in Netlifyproductionanddeploy-previewcontexts innetlify.toml.