.NET microservice that comply with the CQRS and Event Sourcing pattern, that means:
- Command
- Event
- Query Technologies: Docker, MS SQL Server, MongoDB, Apache Kafka.
- Download for Mac or Windows
- Download for Linux Ubuntu
- Download for Linux Debian
- Download for Linux CentOS
- Download for Linux Fedora
# Once installed, check Docker version:
docker --version
# Run following command in docker
docker network create --attachable -d bridge mydockernetwork
- Create docker-compose.yml file with contents:
version: "3.4"
services:
zookeeper:
image: bitnami/zookeeper
restart: always
ports:
- "2181:2181"
volumes:
- "zookeeper_data:/bitnami"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: bitnami/kafka
ports:
- "9092:9092"
restart: always
volumes:
- "kafka_data:/bitnami"
environment:
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092
depends_on:
- zookeeper
volumes:
zookeeper_data:
driver: local
kafka_data:
driver: local
networks:
default:
name: mydockernetwork
external: true
- Then run by executing the following command:
docker-compose up -d
- Run in Docker:
docker run -it -d --name mongo-container \
-p 27017:27017 --network mydockernetwork \
--restart always \
-v mongodb_data_container:/data/db \
mongo:latest
- Run in Docker:
docker run -d --name sql-container \
--network mydockernetwork \
--restart always \
-e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=$tr0ngS@P@ssw0rd02' -e 'MSSQL_PID=Express' \
-p 1433:1433 mcr.microsoft.com/mssql/server:2017-latest-ubuntu