Skip to content

kecso/WDeStuP

Repository files navigation

WDeStuP

This repository is intended to server as a bootstrap for a fully docker based Design Studio development with WebGME. This way, the developer's computer can remain clean from installation (other than docker and required images) of any additional software. So, forget the hassle of installing and running mongoDB, or Nodejs+npm, or Python that all can be challenging based on your actual OS. Just enjoy the pure joy of creating a Design Studio that really boost the productivity of engineers!

Initialization

The easiest way to start using this project is to fork it in git. Alternatively, you can create your empty repository, copy the content and just rename all instances of 'WDeStuP' to your liking. Assuming you fork, you can start-up following this few simple steps:

  • install Docker-Desktop
  • clone the repository
  • edit the '.env' file so that the BASE_DIR variable points to the main repository directory
  • docker-compose up -d
  • connect to your server at http://localhost:8888

Main docker commands

All of the following commands should be used from your main project directory (where this file also should be):

  • To rebuild the complete solution docker-compose build (and follow with the docker-compose up -d to restart the server)
  • To debug using the logs of the WebGME service docker-compose logs webgme
  • To stop the server just use docker-compose stop
  • To enter the WebGME container and use WebGME commands docker-compose exec webgme bash (you can exit by simply closing the command line with linux command 'exit')
  • To clean the host machine of unused (old version) images docker system prune -f

Using WebGME commands to add components to your project

In general, you can use any WebGME commands after you successfully entered the WebGME container. It is important to note that only the src directory is shared between the container and the host machine, so you need to additionally synchronize some files after finishing your changes inside the container! The following is few scenarios that frequently occur:

Adding new npm dependency

When you need to install a new library you should follow these steps:

  • enter the container
  • npm i -s yourNewPackageName
  • exit the container
  • copy the package.json file docker-compose cp webgme:/usr/app/package.json package.json

Alternatively, run the 'add_npm_package.bat(sh)' and follow instructions.

Adding new interpreter/plugin to your DS

Follow these steps to add a new plugin:

  • enter the container
  • for JS plugin: npm run webgme new plugin MyPluginName
  • for Python plugin: npm run webgme new plugin -- --language Python MyPluginName
  • exit container
  • copy webgme-setup.json docker-compose cp webgme:/usr/app/webgme-setup.json webgme-setup.json
  • copy webgme-config docker-compose cp webgme:/usr/app/config/config.webgme.js config/config.webgme.js

Alternatively, run the 'create_plugin.bat(sh)' and follow instructions.

Adding new visualizer to your DS

Follow these steps to add a new visualizer:

  • enter the container
  • npm run webgme new viz MyVisualizerName
  • exit container
  • copy webgme-setup.json docker-compose cp webgme:/usr/app/webgme-setup.json webgme-setup.json
  • copy webgme-config docker-compose cp webgme:/usr/app/config/config.webgme.js config/config.webgme.js

Alternatively, run the 'create_visualizer.bat(sh)' and follow instructions.

Adding new seed to your DS

Follow these steps to add a new seed based on an existing project in your server:

  • enter the container
  • npm run webgme new seed MyProjectName -- -n MySeedName
  • exit container
  • copy webgme-setup.json docker-compose cp webgme:/usr/app/webgme-setup.json webgme-setup.json
  • copy webgme-config docker-compose cp webgme:/usr/app/config/config.webgme.js config/config.webgme.js

Alternatively, run the 'create_seed.bat(sh)' and follow instructions.

About

WebGME based Design Studio Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published