Skip to content

Commit

Permalink
double checking variables values in secrets file
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-awad committed Jan 18, 2024
1 parent 38ac502 commit f26e8d2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/pharmacy-microservice-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ jobs:
- name: Run Docker
run: docker-compose up -d

- name: Use Secret1
run: echo "Kafka Port: ${{ secrets.KAFKA_PORT }}"

- name: Use Secret2
run: echo "Zookeeper Port: ${{ secrets.ZOOKEEPER_PORT }}"

- name: Use Secret3
run: echo "Zookeeper Host Name: ${{ secrets.ZOOKEEPER_HOST_NAME }}"

- name: Wait for Kafka to be ready
run: npx wait-on tcp:127.0.0.1:${{ secrets.KAFKA_PORT }} && echo "Kafka is ready!"

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
environment:
- KAFKA_BROKER_ID=1
- KAFKA_LISTENERS=PLAINTEXT://:${KAFKA_PORT}
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:${KAFKA_PORT}
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:${KAFKA_PORT}
- KAFKA_ZOOKEEPER_CONNECT=${ZOOKEEPER_HOST_NAME}:${ZOOKEEPER_PORT}
- KAFKA_CREATE_TOPICS=notifications:1:1,out_of_stock:1:1
- ALLOW_PLAINTEXT_LISTENER=yes
Expand Down
2 changes: 1 addition & 1 deletion pharmacy/src/producers/MedicineProducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from '../utils/Constants.js';

export const medicineProducer = (app) => {
const client = new KafkaNode.KafkaClient({ kafkaHost: '127.0.0.1:9092' });
const client = new KafkaNode.KafkaClient({ kafkaHost: 'localhost:9092' });
const producer = new KafkaNode.Producer(client);
const kafka_topic = 'out_of_stock';

Expand Down

0 comments on commit f26e8d2

Please sign in to comment.