WISE development uses Docker. Using Docker simplifies and standardizes the development environment so that developers can quickly and easily start developing WISE.
Setup
Install Docker from here. In the Docker preferences, set the RAM to at least 5GB.
Run docker compose up in the WISE-Docker-Dev directory
$ cd WISE-Docker-Dev
WISE-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:
...
wise-client | ** Angular Live Development Server is listening on 0.0.0.0:4200, open your browser on http://localhost:4200/ **
wise-client |
wise-client |
wise-client | ✔ Compiled successfully.
When you see the above output in your log output, WISE will be running at http://localhost:81. Go there with your browser to load the WISE 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.
Main Docker commands
Start/Stop development containers
$ docker-compose [up/down]
List running containers
$ docker container ls
Restart container (ex: ‘wise-client’)
$ docker restart wise-client
Access container’s command line (ex: ‘wise-client’)
$ docker exec -it wise-client sh
Run ‘npm test’ in wise-client container
$ docker exec -it wise-client npm test
Run ‘npm test’ in wise-client container with the watch option
$ docker exec -it wise-client npm test -- "--watch=true"
Run ‘maven test’ in wise-api container
$ docker exec -it wise-api mvn test
MySQL Docker commands
Connect to MySQL container (password: iamroot)
$ docker run -it --network wise-docker-dev_default --rm mysql:8 mysql -hwise-mysql -uroot -p
Import data from mysqldump
$ docker exec -i wise-mysql sh -c 'exec mysql wise_database -uroot -p"$MYSQL_ROOT_PASSWORD"' < ~/path_to/wise_database_dump.sql
WISE development uses Docker. Using Docker simplifies and standardizes the development environment so that developers can quickly and easily start developing WISE.
WISE-Docker-Dev
Description
WISE development uses Docker. Using Docker simplifies and standardizes the development environment so that developers can quickly and easily start developing WISE.
Setup
docker compose up
in the WISE-Docker-Dev directoryAny changes that you make to the source code will be automatically compiled and reloaded in the browser.
Main Docker commands
MySQL Docker commands
Resources
Open-source license: GNU General Public License, v3. See LICENSE.txt for details.
To see WISE in action and for inquiry science curricula developed by the WISE research team at UC Berkeley, visit https://wise.berkeley.edu.
Developer discussions: https://github.com/WISE-Community/WISE-Docker-Dev/discussions
General WISE discussions: https://wise-discuss.berkeley.edu/