- For Mac users:
- Install Homebrew if you haven't already.
brew install dockerbrew install docker-composebrew install node- Navigate to the root of this project directory and run
./scripts/setup.sh
- For windows users:
- Go to https://docs.docker.com/docker-for-windows/install/ to install Docker.
- Go to https://docs.docker.com/compose/install/#install-compose to install Docker Compose.
- Go to https://nodejs.org/en/download/ to install node.js
- Navigate to the root of this project directory and run
./scripts/setup.sh
Preferred IDE: VS Code
This workflow is for if you want to run the entire application using Docker.
- Navigate to the project directory
- Make sure your Docker Daemon is running. For Mac, you'll see the whale icon on the top right corner which is the daemon, so make sure that is running.
- Run
docker-compose up --buildwhen you've made changes to the code. Or omit the--buildflag if you have made no changes. - Go to http://localhost:3000/
It is often slow to do front-end development in a Docker container and wait for code to build. If you are only working on the frontend, run only the backend services through docker-compose, and run the frontend locally.
- Comment out the
clientconfigs indocker-compose.yml. cd clientnpm install(do this only the first time or if you changeclient/package.json)npm start
git checkout -b <your-name>/<feature-name>- Code until you hit a good checkpoint. Make sure there are no errors/broken builds.
git statusshows you what files you have changed.- Commit your files
- If you want to commit all modified files:
git add -A - Otherwise to add the particular files you want to commit:
git add <file1> <file2> <...>
- If you want to commit all modified files:
git commit -m "some commit message"- Push your branch
- For brand new branches:
git push -u origin <branch name> - For previously pushed branches:
git push - you can find your branch names with
git branch
- For brand new branches:
-
Make a new branch formatted
<your-name>/<feature-name>to submit a pull request to master. -
Notify team that a PR has been made :)
-
After a pull request is approved, rebase and squash commits before merging into master
- Checkout to master
git checkout master
- Pull the most recent changes from master
git pull
- Check into the branch of the PR
git checkout <your branch name>
- Rebase and squash commits:
git rebase master
- Push changes to GitHub.
git push -f
Do NOT force push to other people's branches or shared branches
- We are using documentation.js to document code and apidoc.js to document APIs.