Skip to content

Commit

Permalink
Add README and docker-compose for rasy installation
Browse files Browse the repository at this point in the history
  • Loading branch information
EternalStuden1 committed Oct 28, 2022
1 parent 5b7be75 commit 18087b6
Show file tree
Hide file tree
Showing 4 changed files with 182 additions and 27 deletions.
47 changes: 47 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
SECRET_KEY_BASE=euciey3AitaevohReel3yee3AihoeSagroongaiAhaighoh2vahdee3ahsah6fu8baes4kee6zieTae6oz

TZ=Europe/Moscow

#homs
HOMS_URL=http://homs:3000/api
HOMS_PORT=3000
HOMS_LOG_LEVEL=debug
HOMS_USER=user@example.com
HOMS_PASSWORD=changeme
HOMS_TOKEN=ycgx-Zi2ahrohiegae5ne4hb
HOMS_SSL=false
HOMS_TIMEOUT=30000
HOMS_DB_HOST=postgres-homs
HOMS_DB_PORT=5432
HOMS_DB_NAME=homs
HOMS_DB_USER=homs
HOMS_DB_PASSWORD=aen4EepheemeiChohquoomie
HOMS_DB_SEED=true

#camunda
BPM_URL=http://bpm:8080/engine-rest
BPM_HOST=bpm
BPM_PROTOCOL=HTTP
BPM_PORT=8080
BPM_USER=user@example.com
BPM_PASSWORD=changeme
BPM_DB_HOST=postgres-bpm
BPM_DB_PORT=5432
BPM_DB_NAME=camunda
BPM_DB_USER=camunda
BPM_DB_PASSWORD=Beevo1UK1athev3p
BPM_DB_DRIVER=org.postgresql.Driver
BPM_DB_SEED=true
BPM_HISTORY_LEVEL=full
BPM_LOG_LEVEL=debug
HTTP_CONNECT_TIMEOUT_SEC=2400
HTTP_READ_TIMEOUT_SEC=2400
HTTP_WRITE_TIMEOUT_SEC=2400

#minio
MINIO_HOST=http://minio
MINIO_PORT=10000
MINIO_BUCKET_NAME=homs
MINIO_ACCESS_KEY=ees5vu5Ohk3eed2aizoo4Iqu7Ai8poo9
MINIO_SECRET_KEY=aezeib3Eik2xageep8biequah3lahhahMee5ahgai3zeeZohr3ea0boocheiW8ae
MINIO_SSL=false
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- '**'

env:
DOCKER_IMAGE: "latera/camunda-ext2-lite"
DOCKER_IMAGE: "latera/camunda-ext-2-lite"

jobs:
build:
Expand All @@ -36,13 +36,13 @@ jobs:
docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
docker push "${DOCKER_IMAGE}:${{ env.VERSION }}"
docker create --name jar "${DOCKER_IMAGE}:${{ env.VERSION }}"
docker cp jar:/camunda/lib/camunda-7.14-ext-2-${{ env.VERSION }}.jar ./
docker cp jar:/camunda/lib/camunda-7.14-ext-2-lite-${{ env.VERSION }}.jar ./
if: github.event.inputs.version != ''
- name: create release
uses: softprops/action-gh-release@v1
with:
name: ${{ env.VERSION }}
tag_name: ${{ env.VERSION }}
target_commitish: ${{ github.sha }}
files: camunda-7.14-ext-2-${{ env.VERSION }}.jar
files: camunda-7.14-ext-2-lite-${{ env.VERSION }}.jar
if: github.event.inputs.version != ''
42 changes: 18 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
# Camunda Extensions

## Requirements
Camunda-ext-2-lite is an open source part of the camunda-ext-2 library used to relief integration of business process with Hydra components and other systems.
Camunda-ext-2-lite includes the only connector - Hydra OMS connector, all other connects should be designed in the same way.

* [Kotlin](https://kotlinlang.org/docs/getting-started.html) `1.4.31`
### Requirements
* [Docker](https://docker.com/)
* [docker-compose](https://docs.docker.com/compose/install/)
* [Gradle](https://gradle.org/) `1.4.31`

## Building
### Compatibility
* [Camunda 7.14.0 compatible](https://docs.camunda.org/manual/7.14/introduction/) PostgreSQL 9.4 / 9.6 / 10 / 11 / 12
* [Hydra OMS](https://hub.docker.com/r/latera/homs) 2.7.0 and later
* [Minio](https://github.com/minio/minio/releases/tag/RELEASE.2021-06-17T00-10-46Z)

```
./gradlew clean build
```
### Resources
* Documentation: https://github.com/hydra-billing/camunda-ext-2-lite/tree/master/docs
* Tickets/Issues: https://github.com/hydra-billing/camunda-ext-2-lite/issues
* Hydra OMS: https://github.com/hydra-billing/homs

## Testing
## Installation
Edit `.env` file if needed, then run
`docker-compose up -d`

Run all tests with:
```
./gradlew cleanTest test
```

Run a single suite using filtering:
```
./gradlew cleanTest test --tests OrderTest
```

## Documentation

Generate documentation manually:
```
./gradlew dokkaGfm
```
You can read the documentation [here](docs).
Ports and credentials for Camunda, Minio, Hydra OMS are set in `env`.
114 changes: 114 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
version: '2'
services:
db_bpm:
image: postgres:12-alpine
container_name: postgres-bpm
restart: always
env_file: ".env"
environment:
POSTGRES_DB: $BPM_DB_NAME
POSTGRES_USER: $BPM_DB_USER
POSTGRES_PASSWORD: $BPM_DB_PASSWORD
volumes:
- ./data/camunda/postgresql:/var/lib/postgresql/data
networks:
- postgres-bpm
db_homs:
image: postgres:12-alpine
container_name: postgres-homs
restart: always
env_file: ".env"
environment:
POSTGRES_DB: $HOMS_DB_NAME
POSTGRES_USER: $HOMS_DB_USER
POSTGRES_PASSWORD: $HOMS_DB_PASSWORD
volumes:
- ./data/homs/postgresql:/var/lib/postgresql/data
networks:
- postgres-homs
minio:
image: minio/minio
container_name: minio
restart: always
command: server /opt/minio --console-address "0.0.0.0:9001"
env_file: ".env"
environment:
- TZ=${TZ}
volumes:
- ./data/minio:/var/minio
ports:
- $MINIO_PORT:9001
networks:
- default
- minio
homs:
image: latera/homs:2.7.0
container_name: homs
restart: always
env_file: ".env"
environment:
- TZ=${TZ}
- RAILS_ENV=production
- SEED_DB=${HOMS_DB_SEED}
- LOG_LEVEL=${HOMS_LOG_LEVEL}
- ADMIN_EMAIL=${HOMS_USER}
- ADMIN_PASSWORD=${HOMS_PASSWORD}
- ADMIN_API_TOKEN=${HOMS_TOKEN}
- REDIS_URL=redis://redis
depends_on:
- db_homs
ports:
- $HOMS_PORT:3000
networks:
- default
- postgres-homs
- bpm
- homs
- redis
- minio
bpm:
image: latera/camunda-ext-2-lite:6.0
container_name: bpm
restart: always
env_file: ".env"
environment:
DB_USERNAME: $BPM_DB_USER
DB_PASSWORD: $BPM_DB_PASSWORD
WAIT_FOR: "${BPM_DB_HOST}:${BPM_DB_PORT}"
WAIT_FOR_TIMEOUT: 120
ports:
- $BPM_PORT:8080
depends_on:
- db_bpm
networks:
- default
- postgres-bpm
- homs
- minio
redis:
image: healthcheck/redis
container_name: redis
restart: always
environment:
- TZ=${TZ}
networks:
- redis
networks:
postgres-bpm:
internal: true
name: postgres-bpm
postgres-homs:
internal: true
name: postgres-homs
bpm:
internal: true
name: bpm
homs:
internal: true
name: homs
minio:
internal: true
name: minio
redis:
internal: true
name: redis

0 comments on commit 18087b6

Please sign in to comment.