The Fusion engine and services that support it run in Docker containers that can be spun up for local development. To do so, you'll need to download and install Docker if you haven't already. Once you've installed Docker, you'll probably want to allocate at least 6GB of RAM to it so it has the resources necessary to run all the services Fusion requires.
git clone [email protected]:arc-partners/CivicNewsCompany-Themes-PageBuilder-Fusion-Features-Mirror.git
If you don't already have a .env
file in the root directory, create the file and add:
CONTENT_BASE=https://api.sandbox.civicnewscompany.arcpublishing.com
ARC_ACCESS_TOKEN=<<YOUR-ACCESS-TOKEN>>
resizerKey=<<ASK-YOUR-TDM-OR-SA-FOR-THIS>>
More information about environment variables here.
To be able to run locally, you need to create a read-only token in Github. This token needs to be added to your .npmrc
file and will allow you to view and install Themes blocks locally. The .npmrc
file must never be added to the repo or checked in. Note: A .npmrc-encrypted
file will be added by PageBuilder Engine when zipping the bundle for non-local environments. Please use the following format when setting up your .npmrc:
@wpmedia:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=<<PASTE-HERE>>
- Download the
node_modules
:npm install
- To run fusion:
npx fusion start
- Navigate to
http://localhost/pagebuilder/pages
to see the PageBuilder Admin. - If you want to pre-populate your local database with the Sandbox database, see here.
The server needs to be running while you are developing locally, but when you need to stop it, use this command: npx fusion down