From 9986ef82d4a0e914a7fa4774a3af666d7f253c01 Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Mon, 7 Oct 2024 23:18:02 +0600 Subject: [PATCH] Add redis service --- redis/.example.env | 2 ++ redis/.gitignore | 1 + redis/compose.redis.example.yaml | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 redis/.example.env create mode 100644 redis/.gitignore create mode 100644 redis/compose.redis.example.yaml diff --git a/redis/.example.env b/redis/.example.env new file mode 100644 index 0000000..fa96ee8 --- /dev/null +++ b/redis/.example.env @@ -0,0 +1,2 @@ +REDIS_REPLICATION_MODE=master +REDIS_PASSWORD=redispassword diff --git a/redis/.gitignore b/redis/.gitignore new file mode 100644 index 0000000..3af0ccb --- /dev/null +++ b/redis/.gitignore @@ -0,0 +1 @@ +/data diff --git a/redis/compose.redis.example.yaml b/redis/compose.redis.example.yaml new file mode 100644 index 0000000..2f2846e --- /dev/null +++ b/redis/compose.redis.example.yaml @@ -0,0 +1,18 @@ +volumes: + common-redis: + name: 'common-redis' + +services: + redis: + image: bitnami/redis:${REDIS_IMAGE_TAG:-7.4.1} + env_file: + - .env + networks: + common-net: + aliases: + - common-redis + # ports: + # - 127.0.0.1:${REDIS_PUBLISH_PORT:-6379}:6379 + volumes: + - common-redis:/bitnami/redis/data + # - ./data:/bitnami/redis/data