This is the top level readme for the platform. See the wiki for more information on how to contribute.
This project uses Docker and Docker Compose as a way to easily get started. If you are unable to run Docker, you may follow the build instructions within each package to set up everything manually (frontend, backend, database)
- Note: You need to first configure the .env files in the
frontend
folder and thebackend
folder - You may use the following configurations or check the
.env.example
files for the latest configs.
backend/.env file
API_VERSION=1.0.0
ENV=DEV
PORT=9000
# This follows the name of the container (or path, if building locally) to the `database` spring/boot service.
DB_BASE_URL=http://cooper-database-api:8080
frontend/.env file
# This follows the URL of the hosted backend Node API (`backend` service)
REACT_APP_API_BASE_URL="http://localhost:9000/api"
database/.env file
# This follows the name of the container (or path, if building locally) to the MySQL database instance.
DATABASE_HOST=cooper-mysql
DATABASE_USER=root
DATABASE_PASSWORD=root
DATABASE_NAME=cooper
DATABASE_PORT=3306
Once all three .env files are configured in their respective directories, you're ready to bring up the containers.
- Tip: Make sure you can run
npm install
in thefrontend
andbackend
folders as a sanity check.
In the root of the project, after the .env files have been configured, run docker-compose up --build -d
in a terminal window to start the build and run process on your local machine.
- Note: Running
docker-compose down
will bring the containers down and delete them - Tip: If you are having issues with docker, prune your dev environment with the following commands:
docker system prune
-- Will delete any dangling containersdocker volume prune
-- Will delete any unused volumesdocker image prune -a
-- Will delete all images downloaded locally
All code changes are verified by Travis CI which is required for updating the platform. See the individual package configurations for the different requirements.