Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 1.73 KB

File metadata and controls

23 lines (17 loc) · 1.73 KB

Strapi

Three options:
  1. A local strapi instance:
    • Start strapi locally,
    • configure .env with CMS=STRAPI and STRAPI_API pointing to your local strapi instance (cp .env.example .env should do the trick)
  2. Using the the deployed staging strapi instance:
    • Set STRAPI_API=<STRAPI_STAGING_URL>/api and set STRAPI_ACCESS_KEY to your token (create a new key in the strapi GUI at "Settings" > "API Tokens" > "Create new API Token")
  3. Use a local content file:
    • Set STRAPI_API and STRAPI_ACCESS_KEY to point to staging like in option 2.
    • Set CMS=FILE
    • Run pnpm run build:localContent (should have generated a content.json file)
Locales

For each Strapi page, there are two locales: Staging (sg) and Production (de). This is because while we're able to feature flag code changes in PostHog, we aren't able to feature flag content changes in the CMS. E.g. If we want to test out content changes, like different components on the same page, we must use Strapi's Locale feature, as Multi-Environments is only supported by Strapi Cloud.

The App first checks to see if valid staging data exists, and if not, pull the requested data from the production environment. By default, we develop features in the Production environment.