diff --git a/Readme.md b/Readme.md index ada4b29..8d023e6 100644 --- a/Readme.md +++ b/Readme.md @@ -49,6 +49,7 @@ options.ConfigurationOptions = new ConfigurationOptions EndPoints = { "localhost", "6379" } }; ``` +3. RabbitMq: `docker run --name rabbitmq -d -p 5672:5672 -p 15672:15672 rabbitmq:3-management` Running the container 1. Build the Dockerfile: `docker build -t clean-architecture .` diff --git a/docker-compose.yml b/docker-compose.yml index d7b5f06..e4c2feb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,7 @@ services: interval: 30s timeout: 5s retries: 3 + db: image: mcr.microsoft.com/mssql/server environment: @@ -22,6 +23,7 @@ services: - SA_PASSWORD=Password123!# ports: - 1433:1433 + redis: image: docker.io/bitnami/redis:7.2 environment: @@ -32,6 +34,19 @@ services: - '6379:6379' volumes: - 'redis_data:/bitnami/redis/data' + + rabbitmq: + image: "rabbitmq:3-management" + ports: + - "5672:5672" + - "15672:15672" + environment: + - RABBITMQ_DEFAULT_USER=guest + - RABBITMQ_DEFAULT_PASS=guest + volumes: + - rabbitmq_data:/var/lib/rabbitmq + volumes: + rabbitmq_data: redis_data: driver: local diff --git a/k8s-deployment.yml b/k8s-deployment.yml index b36dd0a..a811346 100644 --- a/k8s-deployment.yml +++ b/k8s-deployment.yml @@ -14,7 +14,7 @@ spec: spec: containers: - name: clean-architecture-app - # Replace this with the path to your built image + # Replace this with the path to your built image image: alexdev28/clean-architecture ports: - containerPort: 80 @@ -118,3 +118,52 @@ spec: - protocol: TCP port: 6379 targetPort: 6379 + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: rabbitmq-deployment +spec: + replicas: 1 + selector: + matchLabels: + app: rabbitmq + template: + metadata: + labels: + app: rabbitmq + spec: + containers: + - name: rabbitmq + image: rabbitmq:3-management + ports: + - containerPort: 5672 + - containerPort: 15672 + env: + - name: RABBITMQ_DEFAULT_USER + value: guest + - name: RABBITMQ_DEFAULT_PASS + value: guest + volumeMounts: + - name: rabbitmq-data + mountPath: /var/lib/rabbitmq + volumes: + - name: rabbitmq-data + emptyDir: {} + +--- +apiVersion: v1 +kind: Service +metadata: + name: rabbitmq-service +spec: + selector: + app: rabbitmq + ports: + - protocol: TCP + port: 5672 + targetPort: 5672 + - protocol: TCP + port: 15672 + targetPort: 15672