From e85f6d2a89511fc40f47df970dd784002a06d3f8 Mon Sep 17 00:00:00 2001 From: Toby Hsieh Date: Sun, 22 Sep 2024 21:30:08 -0700 Subject: [PATCH] Create file for Docker Compose This is for manual testing. --- compose.yaml | 28 +++++++++++++++++++ compose/redis.conf | 1 + .../FlagSyncServiceIntegrationTest.kt | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 compose.yaml create mode 100644 compose/redis.conf diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..0f84ed8 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,28 @@ +name: redisflagd + +services: + redis: + image: redis:7-alpine + command: /etc/redis.conf + volumes: + - type: bind + source: ./compose/redis.conf + target: /etc/redis.conf + read_only: true + + redisflagd: + image: redisflagd:latest + # The image should be built with `./gradlew dockerBuildNative` + pull_policy: never + depends_on: + - redis + environment: + REDIS_URI: redis://redis + + flagd: + image: ghcr.io/open-feature/flagd:v0.11.2 + command: start --uri grpc://redisflagd:50051 + ports: + - "8013:8013" + depends_on: + - redisflagd diff --git a/compose/redis.conf b/compose/redis.conf new file mode 100644 index 0000000..2b992a1 --- /dev/null +++ b/compose/redis.conf @@ -0,0 +1 @@ +notify-keyspace-events Kh diff --git a/src/test/kotlin/io/github/tobyhs/redisflagd/FlagSyncServiceIntegrationTest.kt b/src/test/kotlin/io/github/tobyhs/redisflagd/FlagSyncServiceIntegrationTest.kt index 8c6a854..12ccf6c 100644 --- a/src/test/kotlin/io/github/tobyhs/redisflagd/FlagSyncServiceIntegrationTest.kt +++ b/src/test/kotlin/io/github/tobyhs/redisflagd/FlagSyncServiceIntegrationTest.kt @@ -65,7 +65,7 @@ class FlagSyncServiceIntegrationTest : TestPropertyProvider, DescribeSpec({ } } }) { - private val redisContainer: RedisContainer = RedisContainer(RedisContainer.DEFAULT_IMAGE_NAME.withTag("7.0-alpine")) + private val redisContainer: RedisContainer = RedisContainer(RedisContainer.DEFAULT_IMAGE_NAME.withTag("7-alpine")) .withKeyspaceNotifications() @Inject