Skip to content

Commit

Permalink
Updated DC (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
GusevTimofey authored Dec 5, 2023
1 parent 6f5b007 commit 5dc8e9d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
5 changes: 5 additions & 0 deletions create_topic.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#/bin/bash

/opt/bitnami/kafka/bin/kafka-topics.sh --create --topic mempool-tx-topic --bootstrap-server kafka:9092
/opt/bitnami/kafka/bin/kafka-topics.sh --create --topic ledger-tx-topic --bootstrap-server kafka:9092
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server kafka:9092 --list
21 changes: 20 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ services:
image: bitnami/kafka:3.4.0
container_name: kafka
restart: always
ports:
- "9092:9092"
environment:
KAFKA_ENABLE_KRAFT: "yes"
KAFKA_CFG_PROCESS_ROLES: "broker,controller"
Expand All @@ -15,14 +17,26 @@ services:
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: "1@kafka:9093"
KAFKA_CFG_NODE_ID: "1"
healthcheck:
test: ["CMD-SHELL", "kafka-topics.sh --bootstrap-server kafka:9092 --topic hc --create --if-not-exists && kafka-topics.sh --bootstrap-server kafka:9092 --topic hc --describe"]
test: [ "CMD-SHELL", "kafka-topics.sh --bootstrap-server kafka:9092 --topic hc --create --if-not-exists && kafka-topics.sh --bootstrap-server kafka:9092 --topic hc --describe" ]
timeout: 10s
interval: 15s
retries: 5
volumes:
- "kafka-data:/bitnami/kafka"
networks:
- spectrum-network
init-kafka:
image: bitnami/kafka:3.4.0
container_name: init-kafka
working_dir: /opt/bitnami/kafka/bin
command: [ "/bin/bash", "/etc/create_topic.sh" ]
depends_on:
kafka:
condition: service_healthy
volumes:
- "./create_topic.sh:/etc/create_topic.sh:rw"
networks:
- spectrum-network
redis:
image: redis:7.0-alpine
container_name: redis
Expand All @@ -33,6 +47,7 @@ services:
- spectrum-network
utxo-tracker:
image: spectrumlabs/ergo-utxo-tracker:latest
container_name: ergo-utxo-tracker
volumes:
- "log-data:/var/log/dex-backend"
env_file: config.env
Expand All @@ -43,6 +58,7 @@ services:
- spectrum-network
amm-executor:
image: spectrumlabs/ergo-amm-executor:latest
container_name: ergo-amm-executor
restart: always
volumes:
- "log-data:/var/log/dex-backend"
Expand All @@ -65,6 +81,7 @@ services:
- spectrum-network
events-tracker:
image: spectrumlabs/ergo-bots-tracker:latest
container_name: ergo-events-tracker
volumes:
- "log-data:/usr/src/events-streaming/log"
- "${PWD}/rocks/tracker:/tmp/chain"
Expand All @@ -75,6 +92,8 @@ services:
condition: service_healthy
utxo-tracker:
condition: service_started
init-kafka:
condition: service_started
networks:
- spectrum-network

Expand Down

0 comments on commit 5dc8e9d

Please sign in to comment.