From 9193795502f6b0480d4a37280415443bf83bb937 Mon Sep 17 00:00:00 2001 From: Ilya Vasilenko Date: Fri, 7 Jun 2024 10:34:52 +0500 Subject: [PATCH] add redis, kafka --- app/composer.json | 1 + app/composer.lock | 14 +++++++------- compose.yaml | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 7 deletions(-) diff --git a/app/composer.json b/app/composer.json index faeef45..2677425 100644 --- a/app/composer.json +++ b/app/composer.json @@ -12,6 +12,7 @@ "doctrine/doctrine-migrations-bundle": "^3.3", "doctrine/orm": "^3.2", "lexik/jwt-authentication-bundle": "^3.0", + "symfony/cache": "7.0.*", "symfony/console": "7.0.*", "symfony/dotenv": "7.0.*", "symfony/filesystem": "7.0.*", diff --git a/app/composer.lock b/app/composer.lock index 052f7e2..0e49da8 100644 --- a/app/composer.lock +++ b/app/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7018f5f5f0423a379c2210e801c38f64", + "content-hash": "9ef02607d8522e77f2ce17f078546adb", "packages": [ { "name": "doctrine/cache", @@ -1800,16 +1800,16 @@ }, { "name": "symfony/cache", - "version": "v7.0.7", + "version": "v7.0.8", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "48e3508338987d63b0114a00c208c4cbb76e5303" + "reference": "0070bd599ab52c8dc87fa7b782810cba4fde9d06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/48e3508338987d63b0114a00c208c4cbb76e5303", - "reference": "48e3508338987d63b0114a00c208c4cbb76e5303", + "url": "https://api.github.com/repos/symfony/cache/zipball/0070bd599ab52c8dc87fa7b782810cba4fde9d06", + "reference": "0070bd599ab52c8dc87fa7b782810cba4fde9d06", "shasum": "" }, "require": { @@ -1876,7 +1876,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v7.0.7" + "source": "https://github.com/symfony/cache/tree/v7.0.8" }, "funding": [ { @@ -1892,7 +1892,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:29:19+00:00" + "time": "2024-05-31T14:55:39+00:00" }, { "name": "symfony/cache-contracts", diff --git a/compose.yaml b/compose.yaml index 9de3d82..0b9b0e8 100644 --- a/compose.yaml +++ b/compose.yaml @@ -69,5 +69,41 @@ services: MP_SMTP_AUTH_ALLOW_INSECURE: 1 restart: unless-stopped + redis: + container_name: ${CONTAINER_NAME}-redis + image: redis:6.2-alpine + restart: unless-stopped + ports: + - '6379:6379' + command: redis-server --save 20 1 --loglevel warning + volumes: + - redis:/data + + zookeeper: + container_name: ${CONTAINER_NAME}-zookeeper + image: confluentinc/cp-zookeeper:latest + environment: + ZOOKEEPER_CLIENT_PORT: 2181 + ZOOKEEPER_TICK_TIME: 2000 + ports: + - 22181:2181 + + kafka: + container_name: ${CONTAINER_NAME}-kafka + image: confluentinc/cp-kafka:latest + depends_on: + - zookeeper + ports: + - 29092:29092 + environment: + KAFKA_BROKER_ID: 1 + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + volumes: + redis: + driver: local sqldata: -- GitLab