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
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, make sure you are not running any applications on the default ports:
Clone Reaction Platform
git clone firstname.lastname@example.org: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 reaction-next-starterkit_web:latest Running post-build hook script for reaction-next-starterkit. reaction-next-starterkit post-build script invoked. Recreating reaction-next-starterkit_web_1 ... done Running post-project-start hook script for reaction-next-starterkit. reaction-next-starterkit 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 reaction-next-starterkit. reaction-next-starterkit 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 reaction-next-starterkit_web "sh -c 'yarn install…" 15 minutes ago Up 15 minutes 0.0.0.0:4000->4000/tcp reaction-next-starterkit_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
reaction-next-starterkit logs, run:
cd reaction-next-starterkit 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.
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. The normal bootstrapping process will give you the latest released versions of the platform subprojects and is the recommended configuration for regular development. If you want to run a different branch of
reaction-next-starterkit, for example, change directories into
git checkout a different branch there. These steps are an alternative to the standard bootstrapping approach, you should do one or the other, not both:
As documented above, install the prerequisites and clone the reaction-platform repository. Then:
cd reaction-platform make clone
Within the necessary subproject directory or directories run the
git checkout <your-release-tag-or-branch> commands you need to get the specific subproject versions you need checked out.
cd reaction-next-starterkit git checkout develop
Then run the following
cd .. # cd into reaction-platform make
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