Skip to content

Commit

Permalink
impl, added docu
Browse files Browse the repository at this point in the history
Issue imixs#242
  • Loading branch information
rsoika committed May 9, 2023
1 parent e76bed3 commit 86473d6
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 55 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@ COPY open-bpmn.glsp-client/ ./open-bpmn.glsp-client/
WORKDIR /usr/src/app/open-bpmn.glsp-client
RUN yarn

# Copy Start script
WORKDIR /usr/src/app
COPY scripts/start.sh start.sh

EXPOSE 3000
ENTRYPOINT [ "yarn", "start", "--hostname=0.0.0.0" ]

ENTRYPOINT [ "/usr/src/app/start.sh" ]
43 changes: 27 additions & 16 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,55 @@
# Docker

Open-BPMN provides a Docker image to run the BPMN modeler as a Container in Docker or Kubernetes.
Open-BPMN provides a Docker image to run the BPMN modeler as a Container in Docker or Kubernetes.

The Open-BPMN Docker image is based on the [official NodeJS image (node:16-buster)](https://hub.docker.com/_/node). The container image contains a prebuild appliction and exposes the port 3000

In the Dockerfile we are using the entrypoint:

ENTRYPOINT [ "yarn", "start", "--hostname=0.0.0.0" ]
ENTRYPOINT [ "yarn", "start", "--hostname=0.0.0.0" ]

setting the environment param `--hostname=0.0.0.0` is important to allow access form outside the container. Find more details also [here](https://dev.to/hagevvashi/don-t-forget-to-give-host-0-0-0-0-to-the-startup-option-of-webpack-dev-server-using-docker-1483) and [here](https://github.com/theia-ide/theia-apps/tree/master/theia-cpp-docker).
setting the environment param `--hostname=0.0.0.0` is important to allow access form outside the container. Find more details also [here](https://dev.to/hagevvashi/don-t-forget-to-give-host-0-0-0-0-to-the-startup-option-of-webpack-dev-server-using-docker-1483) and [here](https://github.com/theia-ide/theia-apps/tree/master/theia-cpp-docker).

## Build

To build the docker image from sources run:

$ docker build . -t imixs/open-bpmn
$ docker build . -t imixs/open-bpmn


## Run

To run the docker image locally run:

$ docker run --name="open-bpmn" \
--rm \
$ docker run --name="open-bpmn" \
--rm \
-p 3000:3000 \
imixs/open-bpmn
After starting the container the applicaiton is available on

http://localhost:3000

After starting the container the applicaiton is available on

http://localhost:3000


To stop the container run:

$ docker stop open-bpmn
$ docker stop open-bpmn

### Workspace Directory

The Theia Client is using a local workspace directory `/usr/src/app/open-bpmn.glsp-client/workspace`. You can change this directory and map it to a local directory with the Docker param -v

In the following example we map the workspace to the local directory /tmp/my-workspace

$ docker run --name="open-bpmn" \
--rm \
-p 3000:3000 \
-v /tmp/my-workspace:/usr/src/app/open-bpmn.glsp-client/workspace \
imixs/open-bpmn


# Push to Docker-Hub

To push the image manually to a docker repo:

$ docker build . -t imixs/open-bpmn:latest
$ docker push imixs/open-bpmn:latest

$ docker build . -t imixs/open-bpmn:latest
$ docker push imixs/open-bpmn:latest
20 changes: 20 additions & 0 deletions scripts/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
echo "***************************************"
echo "* Starting - Open BPMN..... test *"
echo "***************************************"

# Test server jar...
if [[ -z "${GLSP_SERVER_JAR}" ]]; then
# set default jar
GLSP_SERVER_JAR="open-bpmn.glsp-server/target/open-bpmn.server*-glsp.jar"
fi

echo "Server jar="$GLSP_SERVER_JAR

# Start server in background...
java -jar $GLSP_SERVER_JAR org.openbpmn.glsp.BPMNServerLauncher &

# start client
cd open-bpmn.glsp-client/
yarn start:external --hostname=0.0.0.0
cd ..
63 changes: 39 additions & 24 deletions src/site/markdown/build/DOCKER.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,59 @@
# Docker

Open-BPMN provides a Docker image to run the BPMN modeler as a Container in Docker or Kubernetes.
Open-BPMN provides a Docker image to run the BPMN modeler as a Container in Docker or Kubernetes.

The Open-BPMN Docker image is based on the [official NodeJS image (node:16-buster)](https://hub.docker.com/_/node). The container image contains a prebuild appliction and exposes the port 3000
The Open-BPMN Docker image is based on the [official NodeJS image (node:16-buster)](https://hub.docker.com/_/node). The container image contains a pre-build application and exposes the HTTP port 3000 to run the Client in a Web Browser.

In the Dockerfile we are using the entrypoint:
## Run

ENTRYPOINT [ "yarn", "start", "--hostname=0.0.0.0" ]
To run the docker image locally run:

setting the environment param `--hostname=0.0.0.0` is important to allow access form outside the container. Find more details also [here](https://dev.to/hagevvashi/don-t-forget-to-give-host-0-0-0-0-to-the-startup-option-of-webpack-dev-server-using-docker-1483) and [here](https://github.com/theia-ide/theia-apps/tree/master/theia-cpp-docker).
$ docker run --name="open-bpmn" \
--rm \
-p 3000:3000 \
imixs/open-bpmn

## Build
After starting the container the applicaiton is available on

To build the docker image from sources run:
http://localhost:3000

$ docker build . -t imixs/open-bpmn
To stop the container run:


## Run
$ docker stop open-bpmn

To run the docker image locally run:
### Workspace Directory

$ docker run --name="open-bpmn" \
--rm \
The Theia Client is using a local workspace directory `/usr/src/app/open-bpmn.glsp-client/workspace`. You can change this directory and map it to a local directory with the Docker param -v

In the following example we map the workspace to the local directory /tmp/my-workspace

$ docker run --name="open-bpmn" \
--rm \
-p 3000:3000 \
-v /tmp/my-workspace:/usr/src/app/open-bpmn.glsp-client/workspace \
imixs/open-bpmn
After starting the container the applicaiton is available on

http://localhost:3000
To stop the container run:
## Build

To build the docker image from sources run:

$ docker build . -t imixs/open-bpmn

### Start Script

The Open-BPMN Dockerfile is using a start script to launch the GLSP Server and the GLSP Theia client. The script is reading the GLSP Server version from the environment variable `GLSP_SERVER_JAR`. You can overwrite this variable to build custom images.

$ docker stop open-bpmn
Here is an example for a Dockerfile that copies a custom version of a server:


# Push to Docker-Hub
```
FROM imixs/open-bpmn:latest
# copy imixs-server module
COPY imixs-open-bpmn.server/target/imixs-open-bpmn.server-*-glsp.jar ./open-bpmn.glsp-server/target/
ENV GLSP_SERVER_JAR=open-bpmn.glsp-server/target/imixs-open-bpmn.server-*-glsp.jar
```

To push the image manually to a docker repo:
### Dockerfile Entrypoint

$ docker build . -t imixs/open-bpmn:latest
$ docker push imixs/open-bpmn:latest
In the Dockerfile we are using a custom entrypoint and set the yarn param `--hostname=0.0.0.0`

**Note:** Setting the environment param `--hostname=0.0.0.0` is important to allow access form outside the container. Find more details also [here](https://dev.to/hagevvashi/don-t-forget-to-give-host-0-0-0-0-to-the-startup-option-of-webpack-dev-server-using-docker-1483) and [here](https://github.com/theia-ide/theia-apps/tree/master/theia-cpp-docker).
27 changes: 13 additions & 14 deletions src/site/markdown/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ Learn more about Open BPMN Extensions.

**Open BPMN** is based on the Eclipse Graphical Language Server Platform (GLSP) and provides the following building blocks:

* [open-bpmn.metamodel](https://github.com/imixs/open-bpmn/tree/master/open-bpmn.metamodel) - an open BPMN 2.0 metamodel
* [open-bpmn.glsp-server](https://github.com/imixs/open-bpmn/tree/master/open-bpmn.glsp-server) - the GLSP Server implementation
* [open-bpmn.glsp-client](https://github.com/imixs/open-bpmn/tree/master/open-bpmn.glsp-client) - the GLSP Client components and Theia integration
- [open-bpmn.metamodel](https://github.com/imixs/open-bpmn/tree/master/open-bpmn.metamodel) - an open BPMN 2.0 metamodel
- [open-bpmn.glsp-server](https://github.com/imixs/open-bpmn/tree/master/open-bpmn.glsp-server) - the GLSP Server implementation
- [open-bpmn.glsp-client](https://github.com/imixs/open-bpmn/tree/master/open-bpmn.glsp-client) - the GLSP Client components and Theia integration

### Open-BPMN - BPMN 2.0 Metamodel

**Open BPMN** provides a BPMN 2.0 Metamodel based on pure java. This library can be used to generate a BPMN model programmatically as also import or export a model form any .bpmn file. So in case you want to implement you own BPMN workflow engine the OpenBPMN Metamodel is the perfect library to work with BPMN 2.0 files. THe OpenBPMN Metamodel is based o the org.w3c.dom XML API and includes a set of junit test classes which may be helpful to implement you own business logic.

* [Open BPMN Metamodel](https://github.com/imixs/open-bpmn/tree/master/open-bpmn.metamodel)
- [Open BPMN Metamodel](https://github.com/imixs/open-bpmn/tree/master/open-bpmn.metamodel)

### Open-BPMN GLSP-Server

Expand All @@ -45,17 +45,16 @@ Open-BPMN GLSP-Client

The open-bpmn.glsp-client is the GLSP Client part of Open BPMN providing the graphical modeling tool.


## Tutorials

Open BPMN is based on Eclipse GLSP and adapts the different concepts in various ways. We provide a short collection of tutorials regarding the GLSP framework and how to customize and adapt Open-BPMN. in Open BPMN.

* [The Module System](architecture/MODULE_SYSTEM.html)
* [Build your Own BPMN Extension](BPMN_EXTENSIONS.html)
* [BPMN Properties](BPMN_PROPERTIES.html)
* [Tool Palette](TOOL_PALETTE.html)
* [Custom Element Views](CUSTOM_VIEWS.html)
* [Context Menus](CONTEXT_MENUS.html)
* [BPMN Router](BPMN_ROUTER.html)
* [Build your Own EMF Model](BPMN_EMF.html)
* [Anchors and Ports](SPROTTY_ANCHORS_AND_PORTS.html)
- [The Module System](architecture/MODULE_SYSTEM.html)
- [Build your Own BPMN Extension](glsp-server/BPMN_EXTENSIONS.html)
- [BPMN Properties](glsp-client/BPMN_PROPERTIES.html)
- [Tool Palette](glsp-client/TOOL_PALETTE.html)
- [Custom Element Views](glsp-client/CUSTOM_VIEWS.html)
- [Context Menus](glsp-client/CONTEXT_MENUS.html)
- [BPMN Router](glsp-client/BPMN_ROUTER.html)
- [Build your Own EMF Model](architecture/BPMN_EMF.html)
- [Anchors and Ports](glsp-client/SPROTTY_ANCHORS_AND_PORTS.html)

0 comments on commit 86473d6

Please sign in to comment.