From 7018400e99c6cd4d58216f5096868b45fe355abf Mon Sep 17 00:00:00 2001 From: Marcello Teodori Date: Tue, 12 May 2020 00:55:49 +0100 Subject: [PATCH] fixed makefile for #117 --- docker-compose/.env | 4 +-- docker-compose/Makefile | 16 +++++------ docker-compose/README.md | 57 ++++++++++++++++++++++++++-------------- 3 files changed, 47 insertions(+), 30 deletions(-) diff --git a/docker-compose/.env b/docker-compose/.env index ce6b5f1..607ac90 100644 --- a/docker-compose/.env +++ b/docker-compose/.env @@ -1,4 +1,4 @@ -DOCKER_IP=Your IP is here(not localhost) -VERSION=7.1.0.M5 +DOCKER_IP=kubernetes.docker.internal +VERSION=7.1.0-M7 KEYCLOAK_REALM=activiti KEYCLOAK_RESOURCE=activiti diff --git a/docker-compose/Makefile b/docker-compose/Makefile index 5af884b..61e7045 100644 --- a/docker-compose/Makefile +++ b/docker-compose/Makefile @@ -1,6 +1,6 @@ SHELL := /bin/bash VERSION := 1.0.1 -# If you need to put your Makefile in a different directory to your compose +# If you need to put your Makefile in a different directory to your compose # file, you will need to edit the variable below DOCKER_FILE := docker-compose.yml COMPOSE := docker-compose @@ -16,7 +16,7 @@ help: ## This info @echo '| Make targets: |' @echo '-----------------' @cat Makefile | grep -E '^[a-zA-Z\/_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' - @echo + @echo all: up ## Brings up all services, see docker-compose.yml @@ -26,21 +26,21 @@ infra: nginx keycloak ## Brings up infrastructure services @echo Keycloak path $(DOCKER_IP)/auth @echo infra/stop: ## Stops infrastructure services - make nginx/stop keycloak/stop + make nginx/stop keycloak/stop application: infra rabbitmq ## Brings up Activiti application services - make example-runtime-bundle example-cloud-connector activiti-cloud-query activiti-cloud-audit activiti-cloud-notifications-graphql + make example-runtime-bundle example-cloud-connector activiti-cloud-query @echo Runtime bundle entry point: http://$(DOCKER_IP)/rb application/stop: ## Stops up Activiti application services make rabbitmq/stop - make example-runtime-bundle/stop example-cloud-connector/stop activiti-cloud-query/stop activiti-cloud-audit/stop activiti-cloud-notifications-graphql/stop + make example-runtime-bundle/stop example-cloud-connector/stop activiti-cloud-query/stop modeler: infra ## Brings up Modeler services, see docker-compose.yml - make activiti-cloud-modeling activiti-cloud-modeling-backend + make activiti-cloud-modeling activiti-cloud-modeling-backend @echo @echo @echo Modeling app: http://$(DOCKER_IP)/modeling - @echo + @echo modeler/stop: ## Stop Modeler services make activiti-cloud-modeling/stop activiti-cloud-modeling-backend/stop @@ -50,7 +50,7 @@ up: ## Bring system up, see docker-compose.yml @echo Keycloak path: http://$(DOCKER_IP)/auth @echo Modeling app: http://$(DOCKER_IP)/modeling @echo Runtime bundle entry point: http://$(DOCKER_IP)/rb - @echo + @echo $(COMPOSE) up -d logs: ## Follow all container logs in terminal diff --git a/docker-compose/README.md b/docker-compose/README.md index 69f3730..4272143 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -1,34 +1,50 @@ -# Easy way to run activiti7 with docker compose +# Easy way to run Activiti Cloud with Docker Compose -### Prerequisite: -Change DOCKER_IP to your ip in .env +### Prerequisite + +Change DOCKER_IP to your IP address in .env or keep the default value 'kubernetes.docker.internal' +if you are using [Docker Desktop](https://www.docker.com/products/docker-desktop). ### Start options -For starting whole system +For starting the whole system: ``` make all ``` -For starting all services without modeller +and stopping: +``` +make stop +``` + +For starting all services without modeler: +``` +make application +``` +and stopping: ``` -make application +make application/stop ``` -For starting modeler and keycloak +For starting modeler and keycloak: ``` make modeler ``` +and stopping: +``` +make modeler/stop +``` -To see logs +To see logs: ``` -make logs +make logs ``` -Other available actions +Other available actions: ``` make help ``` -### Modeller +### Modeler + To access modeler please use url ``` http://$DOCKER_IP/modeling @@ -37,19 +53,20 @@ For example ``` http://192.168.1.9/modeling ``` -You will be redirected to keycloak where you have to use credentials *modeler/password* +You will be redirected to keycloak where you have to use credentials *modeler/password* + + +### Start Process -### Start process -If there is no Postman intalled please download Postman https://www.getpostman.com/downloads/ -Then +If not installed, please download [Postman](https://www.getpostman.com/downloads), then: ``` git clone https://github.com/Activiti/activiti-cloud-examples ``` -Then add to Postman collection _Activiti v7 REST API.postman_collection.json_
-*Then at the top right choose manage environment then use your own ip in _current value_ tab.*
-Then use _activiti_ as default environment.
-To start work execute _getKeycloakToken hruser_ in postman keycloak folder.
-Then run startProcess in rb-my-app postman folder.
+and add to Postman collection `Activiti v7 REST API.postman_collection.json`. +Then at the top right choose manage environment then use your own ip in _current value_ tab. +Then use _activiti_ as default environment. +To start work execute _getKeycloakToken hruser_ in postman keycloak folder. +Then run startProcess in rb-my-app postman folder.