Skip to content

Commit

Permalink
chore(docker): introduce docker profiles for in-memory and postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
saig0 committed Aug 22, 2022
1 parent 19499d2 commit 20d5f6a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 12 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ Get jobs from a specific process instance
The docker image for the ZeeQS application is published to [GitHub Packages](https://github.com/orgs/camunda-community-hub/packages/container/package/zeeqs).

```
docker pull ghcr.io/camunda-community-hub/zeeqs:2.1.0
docker pull ghcr.io/camunda-community-hub/zeeqs:2.3.1
```

* ensure that a Zeebe broker is running with a Hazelcast exporter (>= 1.0.0)
Expand All @@ -501,19 +501,25 @@ docker pull ghcr.io/camunda-community-hub/zeeqs:2.1.0
If the Zeebe broker runs on your local machine with the default configs then start the container with the following command:

```
docker run --network="host" ghcr.io/camunda-community-hub/zeeqs:2.1.0
docker run --network="host" ghcr.io/camunda-community-hub/zeeqs:2.3.1
```

For a local setup, the repository contains a [docker-compose file](docker/docker-compose.yml). It starts a Zeebe broker with the Hazelcast exporter and the ZeeQS application.

```
mvn clean install -DskipTests
cd docker
docker-compose up
docker-compose --profile in-memory up
```

* the GraphQL endpoint is available under the port `9000`

To use PostgreSQL instead of the in-memory database, use the profile `postgres`.

```
docker-compose --profile postgres up
```

### Manual

1. Download the latest [application JAR](https://github.com/zeebe-io/zeeqs/releases) _(zeeqs-%{VERSION}.jar )_
Expand Down
38 changes: 29 additions & 9 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "2"
version: "3"

networks:
zeebe_network:
Expand All @@ -7,7 +7,7 @@ networks:
services:
zeebe:
container_name: zeebe_broker
image: camunda/zeebe:1.3.0
image: camunda/zeebe:8.0.5
environment:
- ZEEBE_LOG_LEVEL=debug
ports:
Expand All @@ -20,26 +20,43 @@ services:
networks:
- zeebe_network

zeeqs:
container_name: zeeqs
image: ghcr.io/camunda-community-hub/zeeqs:2.1.0
zeeqs-in-memory:
container_name: zeeqs-in-memory
image: ghcr.io/camunda-community-hub/zeeqs:2.3.1
environment:
- zeebe.client.broker.gateway-address=zeebe:26500
- zeebe.client.worker.hazelcast.connection=zeebe:5701
- spring.datasource.url=jdbc:postgresql://db:5432/postgres
ports:
- "8082:8082"
depends_on:
- zeebe
networks:
- zeebe_network
profiles:
- in-memory

zeeqs-postgres:
container_name: zeeqs-postgres
image: ghcr.io/camunda-community-hub/zeeqs:2.3.1
environment:
- zeebe.client.worker.hazelcast.connection=zeebe:5701
- spring.datasource.url=jdbc:postgresql://postgres-zeeqs:5432/postgres
- spring.datasource.username=postgres
- spring.datasource.password=zeebe
- spring.datasource.driverClassName=org.postgresql.Driver
- spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
- spring.jpa.hibernate.ddl-auto=create

ports:
- "9000:9000"
depends_on:
- zeebe
- postgres-zeeqs
networks:
- zeebe_network
profiles:
- postgres

db:
postgres-zeeqs:
image: postgres:12.2
restart: always
environment:
Expand All @@ -48,6 +65,9 @@ services:
- database-data:/var/lib/postgresql/data/
networks:
- zeebe_network
profiles:
- postgres

volumes:
database-data:
database-data:
driver: local

0 comments on commit 20d5f6a

Please sign in to comment.