SCORE development uses Docker. Using Docker simplifies and standardizes the development environment so that developers can quickly and easily start developing SCORE.
- Install Docker from here. In the Docker preferences, set the RAM to at least 5GB.
- In the same folder, checkout SCORE-Docker-Dev (this project), SCORE-API, and SCORE-Client.
$ git clone https://github.com/encorelab/SCORE-Docker-Dev
$ git clone https://github.com/encorelab/SCORE-API
$ git clone https://github.com/encorelab/SCORE-Client
$ ls
SCORE-Docker-Dev
SCORE-API
SCORE-Client
- Run
docker compose up
in the SCORE-Docker-Dev directory
$ cd SCORE-Docker-Dev
SCORE-Docker-Dev $ docker compose up
- Wait for everything to download, compile, and start. This can take a while depending on your computer and connection speeds. When you see this in the output, all of the application has started:
...
score-client | ** Angular Live Development Server is listening on 0.0.0.0:4200, open your browser on http://localhost:4200/ **
score-client |
score-client |
score-client | ✔ Compiled successfully.
- When you see the above output in your log output, SCORE will be running at http://localhost:81. Go there with your browser to load the SCORE homepage.
- Log in with admin/pass, or previewuser/wise.
Any changes that you make to the source code will be automatically compiled and reloaded in the browser.
- Start/Stop development containers
docker-compose [up/down]
- List running containers
docker container ls
- Restart container (ex: 'score-client')
docker restart score-client
- Access container's command line (ex: 'score-client')
docker exec -it score-client sh
- Run 'npm test' in score-client container
docker exec -it score-client npm test
- Run 'npm test' in score-client container with the watch option
docker exec -it score-client npm test -- "--watch=true"
- Run 'maven test' in score-api container
docker exec -it score-api mvn test
- Connect to MySQL container (password: iamroot)
docker run -it --network score-docker-dev_default --rm mysql:8 mysql -hscore-mysql -uroot -p
- Import data from mysqldump
docker exec -i score-mysql sh -c 'exec mysql wise_database -uroot -p"$MYSQL_ROOT_PASSWORD"' < ~/path_to/wise_database_dump.sql
- Dump data from MySQL container
docker exec -i score-mysql sh -c 'exec mysqldump wise_database -uroot -p"$MYSQL_ROOT_PASSWORD"' > wise_database_dump.sql
Open-source license: GNU General Public License, v3. See LICENSE.txt for details.