Skip to content

Commit

Permalink
Merge pull request #2 from hydra-billing/build_updates
Browse files Browse the repository at this point in the history
Update Dockerfile and build.gradle
  • Loading branch information
EternalStuden1 authored Oct 28, 2022
2 parents e9c7ea6 + 1a017d0 commit 3c6a290
Show file tree
Hide file tree
Showing 11 changed files with 182 additions and 140 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=[email protected]
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=[email protected]
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
Empty file modified Dockerfile
100644 → 100755
Empty file.
42 changes: 18 additions & 24 deletions README.md
100644 → 100755
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
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# build camunda-ext-2
# build camunda-ext-2-lite
FROM gradle:7.1.1 as camunda-ext-2-lite

COPY ./lib ./gradle ./gradlew ./settings.gradle ./gradlew.bat /app/
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ case "`uname`" in
Darwin* )
darwin=true
;;
MSYS* | MINGW* )
MINGW* )
msys=true
;;
NONSTOP* )
Expand Down
Empty file modified gradlew.bat
100644 → 100755
Empty file.
113 changes: 0 additions & 113 deletions lib/gradle.lockfile

This file was deleted.

Empty file modified settings.gradle
100644 → 100755
Empty file.

0 comments on commit 3c6a290

Please sign in to comment.