The Reaction Platform is the easiest way to run the entire suite of Reaction services at once, as of Reaction version 2.0. The Platform installs and runs the entire suite of Reaction services in these directories:
|GraphQL API, Meteor API, Classic UI, Mongo|
|Authentication server, PostgreSQL|
|Next.js storefront application|
- Install Docker and Docker Compose (Mac | Windows | Linux)
- Install Node.js
- A GitHub account with a configured SSH key
Recommended settings for Docker for Mac, Windows and Linux
- Minimum 4GB of RAM and 4CPUs, for better performance allocate 4GB+ and 4CPUs+. For instructions visit the advanced section of the Docker for Mac Getting Started guide.
Windows: Reaction Platform has not been fully tested on Windows at this time.
Linux: Docker Compose is included when installing Docker on Mac and Windows, but will need to be installed separately on Linux.
- Before you get started:
- Increase the memory and CPU allocated to Docker in the Docker settings. We recommend at least 4 GiB memory. The default values are usually not sufficient to run the full Reaction system. See the troubleshooting-development article for more information.
- Make sure you are not running any applications on the default ports:
- Clone Reaction Platform
git clone email@example.com:reactioncommerce/reaction-platform.git
- Now you're ready to install. Run this command to bootstrap and start all of the services:
cd reaction-platform make
This process may take some time. The Platform is checking that dependencies are present, cloning the sub-projects from GitHub, downloading and building Docker images, and starting services.
By the end of the initial
make process, you should see these log messages:
Successfully tagged example-storefront_web:latest Running post-build hook script for example-storefront. example-storefront post-build script invoked. Recreating example-storefront_web_1 ... done Running post-project-start hook script for example-storefront. example-storefront post-project-start script invoked. Running post-system-start hook script for reaction-hydra. reaction-hydra post-system-start script invoked. No post-system-start hook script for reaction. Skipping. Running post-system-start hook script for example-storefront. example-storefront post-system-start script invoked.
You can confirm that all of these containers have installed and are starting up by running:
You should see a log of all running containers with names, ports and statuses:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7616b75a7277 example-storefront_web "sh -c 'yarn install…" 15 minutes ago Up 15 minutes 0.0.0.0:4000->4000/tcp example-storefront_web_1 56053f0275fb reaction_reaction "bash -c 'npm instal…" 18 minutes ago Up 18 minutes 0.0.0.0:3000->3000/tcp reaction_reaction_1 31f4180746a4 mongo:3.6.3 "docker-entrypoint.s…" 2 weeks ago Up 18 minutes 0.0.0.0:27017->27017/tcp reaction_mongo_1 1f420dd7c664 oryd/hydra:v1.0.0-beta.9-alpine "hydra serve all --d…" 2 weeks ago Up 19 minutes 0.0.0.0:4444-4445->4444-4445/tcp, 0.0.0.0:5555->5555/tcp reaction-hydra_hydra_1 fc43e0a4d55b postgres:10.3 "docker-entrypoint.s…" 2 weeks ago Up 19 minutes 0.0.0.0:32769->5432/tcp reaction-hydra_postgres_1
- As the various repositories are downloading and services are starting, check the logs by running
docker-compose logs -fin the specific repository. For example, to display the
cd reaction docker-compose logs -f
To display the
example-storefront logs, run:
cd example-storefront docker-compose logs -f
- Once all of the services are running, the following will be accessible at these URLs:
- Congrats 🎉 Now you're running the entire suite of Reaction Platform services and ready to start developing.
Note: To login into the Operator UI use the credentials found in the env.example file.
Upgrading from 1.x?
If you are upgrading from Reaction 1.x, follow these steps:
- Pull locally the latest changes from the reaction-platform repository
cd reaction-platform git pull origin master
- Pull locally the latest changes from the reaction repository and update packages
cd reaction-platform/reaction git pull origin master docker-compose run --rm reaction npm install
- Pull locally the latest changes from the example-storefront repository and update packages
cd reaction-platform/example-storefront git pull origin master docker-compose run --rm web yarn install
- You are now ready to start the upgraded Reaction. Run this command to bootstrap and start all of the services:
cd reaction-platform make
Note: As of Reaction 2.0 the CLI is deprecated and unsupported. You can use Docker commands instead. See the Reaction CLI article for more information.
Upgrading from an older 2.0 release candidate?
If you are upgrading from an older 2.0 release candidate, follow the steps listed in the Installation section of this doc.
Developing with Reaction Platform
Once you've bootstrapped the entire Reaction development in Docker, use
make start to start all containers.
Reaction Platform commands
Run these commands from the
|Boostraps the entire Reaction development environment in Docker.|
|Stops all containers.|
|Starts all containers.|
|Removes all containers. Volumes are not removed.|
|Removes all containers, networks, and volumes. Any volume data will be lost.|
Learn more about Reaction Platform.
Each sub-project has its own respective Git repository. If you want to run a different branch of
example-storefront, for example, change directories into
git checkout a different branch there.
Most Reaction services need certain environment variables set properly before they will start. Each project has a
.env.example file that is copied to a Git-ignored
.env file by the project's pre-build script. In most cases, these should have the correct values for running locally by default, but it's a good idea to review them.
Later, when you pull new commits for a project or check out a different branch, the project may have changed requirements for environment variables. But your
.env file will not update automatically because it is Git-ignored. Thus, it's a good idea after every pull or checkout to either rebuild the project or
cd into the project folder and run the
bin/setup script. (For the
reaction project, the script is at
.reaction/scripts/setup instead of
bin/setup due to how Meteor works.) This script will copy missing environment variables from
.env. Alternatively, you can compare and update