forked from imixs/open-bpmn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue imixs#242
- Loading branch information
Showing
5 changed files
with
105 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters