Giter Club home page Giter Club logo

wise-docker-dev's Introduction

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

  1. Install Docker from here. In the Docker preferences, set the RAM to at least 5GB.
  2. In the same folder, checkout WISE-Docker-Dev (this project), WISE-API, and WISE-Client.
$ git clone https://github.com/WISE-Community/WISE-Docker-Dev
$ git clone https://github.com/WISE-Community/WISE-API
$ git clone https://github.com/WISE-Community/WISE-Client
$ ls
WISE-Docker-Dev
WISE-API
WISE-Client
  1. Run docker compose up in the WISE-Docker-Dev directory
$ cd WISE-Docker-Dev
WISE-Docker-Dev $ docker compose up
  1. 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.
  1. 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.
  2. 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

  1. Start/Stop development containers
$ docker-compose [up/down]
  1. List running containers
$ docker container ls
  1. Restart container (ex: 'wise-client')
$ docker restart wise-client
  1. Access container's command line (ex: 'wise-client')
$ docker exec -it wise-client sh
  1. Run 'npm test' in wise-client container
$ docker exec -it wise-client npm test
  1. Run 'npm test' in wise-client container with the watch option
$ docker exec -it wise-client npm test -- "--watch=true"
  1. Run 'maven test' in wise-api container
$ docker exec -it wise-api mvn test

MySQL Docker commands

  1. Connect to MySQL container (password: iamroot)
$ docker run -it --network wise-docker-dev_default --rm mysql:8 mysql -hwise-mysql -uroot -p 
  1. 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
  1. Dump data from MySQL container
$ docker exec -i wise-mysql sh -c 'exec mysqldump wise_database -uroot -p"$MYSQL_ROOT_PASSWORD"' > wise_database_dump.sql

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/

wise-docker-dev's People

Contributors

breity avatar geoffreykwan avatar hirokiterashima avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.