Skip to content

Commit

Permalink
added kafka, zookeeper, cockroachdb
Browse files Browse the repository at this point in the history
  • Loading branch information
rgfaber committed Jun 2, 2022
1 parent ad8511d commit 15ee850
Show file tree
Hide file tree
Showing 14 changed files with 127 additions and 2 deletions.
Empty file added backend/cockroachdb/.env
Empty file.
1 change: 1 addition & 0 deletions backend/cockroachdb/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM cockroachdb/cockroach
7 changes: 7 additions & 0 deletions backend/kafka/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
KAFKA_BROKER_ID=1
KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://broker:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1
1 change: 1 addition & 0 deletions backend/kafka/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM confluentinc/cp-kafka:7.0.1
2 changes: 2 additions & 0 deletions backend/zookeeper/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ZOOKEEPER_CLIENT_PORT=2181
ZOOKEEPER_TICK_TIME=2000
1 change: 1 addition & 0 deletions backend/zookeeper/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM confluentinc/cp-zookeeper:7.0.1
28 changes: 28 additions & 0 deletions cockroachdb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: '3.5'

services:

crdb:
image: local/crdb
container_name: crdb
hostname: crdb
build:
context: ./backend/cockroachdb
ports:
- "26257:26257"
- "8080:8080"
command: start-single-node --insecure
env_file:
- ./backend/cockroachdb/.env
volumes:
- cockroach-data:/cockroach/cockroach-data


volumes:

cockroach-data:
driver: local
driver_opts:
type: none
device: /volume/crdb/data
o: bind
41 changes: 41 additions & 0 deletions kafka.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: '3.5'
services:
zookeeper:
image: local/zookeeper
build:
context: ./backend/zookeeper
hostname: zookeeper
container_name: zookeeper
networks:
- dev-net
env_file:
- ./backend/zookeeper/.env

kafka:
image: local/kafka
container_name: kafka-dev
build:
context: ./backend/kafka
hostname: kafka
networks:
- dev-net
ports:
# To learn about configuring Kafka for access across networks see
# https://www.confluent.io/blog/kafka-client-cannot-connect-to-broker-on-aws-on-docker-etc/
- "9092:9092"
depends_on:
- zookeeper
volumes:
- kafka-data:/var/lib/kafka/data
env_file:
- ./backend/kafka/.env


volumes:

kafka-data:
driver: local
driver_opts:
type: none
device: /volume/kafka/data
o: bind
34 changes: 34 additions & 0 deletions mockery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: '3.5'

services:
mockery:
image: local/mockery
build:
context: ./tools/mockery
env_file:
- ./tools/mockery/.env
container_name: mockery
hostname: mockery
ports:
- "9666:9666"
networks:
- dev-net
volumes:
- spacedeck-storage:/app/storage
- spacedeck-db:/app/database


volumes:
spacedeck-storage:
driver: local
driver_opts:
type: none
device: /volume/spacedeck/storage
o: bind

spacedeck-db:
driver: local
driver_opts:
type: none
device: /volume/spacedeck/db
o: bind
13 changes: 11 additions & 2 deletions run-minimal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ sudo mkdir -p /volume/postgres/data
sudo mkdir -p /volume/spacedeck/storage
sudo mkdir -p /volume/spacedeck/db

# KAFKA
sudo mkdir -p /volume/kafka/data

# COCKROACHDB
sudo mkdir -p /volume/crdb/data





Expand All @@ -58,7 +65,8 @@ docker-compose -f couchdb.yml \
-f rabbitmq.yml \
-f postgresql.yml \
-f mongodb.yml \
-f spacedeck.yml \
-f kafka.yml \
-f cockroachdb.yml \
-f networks.yml \
down

Expand All @@ -69,7 +77,8 @@ docker-compose -f couchdb.yml \
-f rabbitmq.yml \
-f postgresql.yml \
-f mongodb.yml \
-f spacedeck.yml \
-f kafka.yml \
-f cockroachdb.yml \
-f networks.yml \
up --build $1

Empty file added test.sh
Empty file.
Empty file added tools/.keep
Empty file.
Empty file added tools/mockery/.env
Empty file.
1 change: 1 addition & 0 deletions tools/mockery/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM vektra/mockery

0 comments on commit 15ee850

Please sign in to comment.