diff options
Diffstat (limited to 'docker-compose')
-rw-r--r-- | docker-compose/README.md | 11 | ||||
-rwxr-xr-x | docker-compose/docker-compose.yml | 28 |
2 files changed, 36 insertions, 3 deletions
diff --git a/docker-compose/README.md b/docker-compose/README.md index c172276ebe..3fe7f9940e 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -50,8 +50,13 @@ mvn clean install -P<docker-profile> `docker-compose/docker-compose.yml` file is provided to be run with `docker-compose` tool and images previously built. It starts both Postgres database and CPS services. -1. Edit `docker-compose.yml` and uncomment desired service to be deployed, by default `cps-and-ncmp` - is enabled. You can comment it and uncomment `cps-standalone` or `ncmp-standalone`. +1. Edit `docker-compose.yml` + 1. uncomment desired service to be deployed, by default `cps-and-ncmp` is enabled. You can comment it and uncomment `cps-standalone` or `ncmp-standalone`. + 2. To send data-updated events to kafka, + * uncomment the `zookeeper` and `kafka` services. + * uncomment environment variables + * `notification.data-updated.enabled: 'true'` + * `KAFKA_BOOTSTRAP_SERVER: kafka:9092` 2. Execute following command from `docker-compose` folder: Use one of the below version type that has been generated in the local system's docker image list after the build. @@ -59,7 +64,7 @@ Use one of the below version type that has been generated in the local system's VERSION=latest DB_USERNAME=cps DB_PASSWORD=cps docker-compose up -d or VERSION=<version> DB_USERNAME=cps DB_PASSWORD=cps docker-compose up -d -``` +``` ## Running or debugging Java built code diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 2878462a36..51bb162b20 100755 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -30,6 +30,8 @@ services: # DB_HOST: dbpostgresql # DB_USERNAME: ${DB_USERNAME:-cps} # DB_PASSWORD: ${DB_PASSWORD:-cps} + # #KAFKA_BOOTSTRAP_SERVER: kafka:9092 + # #notification.data-updated.enabled: 'true' # restart: unless-stopped # depends_on: # - dbpostgresql @@ -45,6 +47,8 @@ services: # DB_HOST: dbpostgresql # DB_USERNAME: ${DB_USERNAME:-cps} # DB_PASSWORD: ${DB_PASSWORD:-cps} + # #KAFKA_BOOTSTRAP_SERVER: kafka:9092 + # #notification.data-updated.enabled: 'true' # restart: unless-stopped # depends_on: # - dbpostgresql @@ -60,6 +64,8 @@ services: DB_HOST: dbpostgresql DB_USERNAME: ${DB_USERNAME:-cps} DB_PASSWORD: ${DB_PASSWORD:-cps} + #KAFKA_BOOTSTRAP_SERVER: kafka:9092 + #notification.data-updated.enabled: 'true' restart: unless-stopped depends_on: - dbpostgresql @@ -73,3 +79,25 @@ services: POSTGRES_DB: cpsdb POSTGRES_USER: ${DB_USERNAME:-cps} POSTGRES_PASSWORD: ${DB_PASSWORD:-cps} + +# zookeeper: +# image: confluentinc/cp-zookeeper:6.1.1 +# environment: +# ZOOKEEPER_CLIENT_PORT: 2181 +# ZOOKEEPER_TICK_TIME: 2000 +# ports: +# - 22181:2181 +# +# kafka: +# image: confluentinc/cp-kafka:6.1.1 +# depends_on: +# - zookeeper +# ports: +# - 29092:29092 +# environment: +# KAFKA_BROKER_ID: 1 +# KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 +# KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092 +# KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT +# KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT +# KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 |