chore: remove unused redis

This commit is contained in:
2026-08-06 19:42:32 +02:00
parent e67c475c38
commit 85bcdcadb8
15 changed files with 0 additions and 72 deletions
-1
View File
@@ -30,7 +30,6 @@ Framework
Database Database
- Postgresql - Postgresql
- with Flyway - with Flyway
- Redis
- RabbitMQ - RabbitMQ
Infra Infra
-1
View File
@@ -81,7 +81,6 @@ dependencies {
implementation("io.github.oshai:kotlin-logging-jvm:${kotlinLoggingVersion.get()}") implementation("io.github.oshai:kotlin-logging-jvm:${kotlinLoggingVersion.get()}")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:${kotlinSerializationVersion.get()}") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:${kotlinSerializationVersion.get()}")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2")
implementation("redis.clients:jedis:5.2.0")
implementation("org.postgresql:postgresql:42.7.13") implementation("org.postgresql:postgresql:42.7.13")
implementation("com.zaxxer:HikariCP:6.3.0") implementation("com.zaxxer:HikariCP:6.3.0")
implementation("com.rabbitmq:amqp-client:5.25.0") implementation("com.rabbitmq:amqp-client:5.25.0")
-2
View File
@@ -25,11 +25,9 @@ Api url:
Exposed url on dev env: Exposed url on dev env:
- [PostgreSql](http://localhost:5432/) - [PostgreSql](http://localhost:5432/)
- [Redis](http://localhost:6379/)
- [RabbitMQ](http://localhost:15672/) - [RabbitMQ](http://localhost:15672/)
Admin service URL: Admin service URL:
- [Træfik dashboard](http://traefik.traefik.me/) - [Træfik dashboard](http://traefik.traefik.me/)
- [Redis insight](http://insight.redis.traefik.me/)
- [pgAdmin](http://pgadmin.postgresql.traefik.me/) - [pgAdmin](http://pgadmin.postgresql.traefik.me/)
- [RabbitMQ management](http://management.rabbitmq.traefik.me/) - [RabbitMQ management](http://management.rabbitmq.traefik.me/)
-1
View File
@@ -1,3 +1,2 @@
REDIS_URL=redis://redis:6379
POSTGRESQL_URL=jdbc:postgresql://postgresql/event-demo POSTGRESQL_URL=jdbc:postgresql://postgresql/event-demo
RABBITMQ_URL=rabbitmq RABBITMQ_URL=rabbitmq
-2
View File
@@ -10,8 +10,6 @@ services:
condition: service_healthy condition: service_healthy
rabbitmq: rabbitmq:
condition: service_healthy condition: service_healthy
redis:
condition: service_healthy
env_file: env_file:
- ../.env.docker - ../.env.docker
labels: labels:
@@ -1,8 +1,4 @@
services: services:
redis:
ports:
- "6379:6379"
postgresql: postgresql:
ports: ports:
- "5432:5432" - "5432:5432"
@@ -1,12 +1,4 @@
services: services:
redis:
image: redis/redis-stack:7.4.0-v8
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
volumes:
- redis_data:/data
- redisinsight_data:/redisinsight
flyway: flyway:
image: flyway/flyway image: flyway/flyway
command: migrate command: migrate
@@ -45,7 +37,5 @@ services:
- rabbitmq_data:/var/lib/rabbitmq/ - rabbitmq_data:/var/lib/rabbitmq/
volumes: volumes:
redis_data:
redisinsight_data:
postgresql_data: postgresql_data:
rabbitmq_data: rabbitmq_data:
-2
View File
@@ -13,8 +13,6 @@ services:
condition: service_healthy condition: service_healthy
rabbitmq: rabbitmq:
condition: service_healthy condition: service_healthy
redis:
condition: service_healthy
env_file: env_file:
- ../.env.docker - ../.env.docker
-6
View File
@@ -12,12 +12,6 @@ services:
- "traefik.http.routers.pgadmin.rule=Host(`pgadmin.postgresql.traefik.me`)" - "traefik.http.routers.pgadmin.rule=Host(`pgadmin.postgresql.traefik.me`)"
- "traefik.http.services.pgadmin.loadbalancer.server.port=80" - "traefik.http.services.pgadmin.loadbalancer.server.port=80"
redis:
labels:
- "traefik.http.routers.redisinsight.rule=Host(`insight.redis.traefik.me`)"
- "traefik.http.routers.redisinsight.service=redisinsight"
- "traefik.http.services.redisinsight.loadbalancer.server.port=8001"
rabbitmq: rabbitmq:
labels: labels:
- "traefik.http.routers.rabbitmq-management.rule=Host(`management.rabbitmq.traefik.me`)" - "traefik.http.routers.rabbitmq-management.rule=Host(`management.rabbitmq.traefik.me`)"
@@ -3,7 +3,6 @@ package eventDemo.configuration
import io.ktor.server.config.ApplicationConfig import io.ktor.server.config.ApplicationConfig
data class Configuration( data class Configuration(
val redisUrl: String,
val jwtSecret: String, val jwtSecret: String,
val postgresql: Postgresql, val postgresql: Postgresql,
val rabbitmq: RabbitMQ, val rabbitmq: RabbitMQ,
@@ -25,7 +24,6 @@ data class Configuration(
val ApplicationConfig.configuration val ApplicationConfig.configuration
get() = get() =
Configuration( Configuration(
redisUrl = getProperty("redis.url"),
jwtSecret = getProperty("jwt.secret"), jwtSecret = getProperty("jwt.secret"),
postgresql = postgresql =
Configuration.Postgresql( Configuration.Postgresql(
@@ -7,8 +7,6 @@ import org.koin.core.module.Module
import org.koin.core.scope.Scope import org.koin.core.scope.Scope
import org.koin.core.scope.ScopeCallback import org.koin.core.scope.ScopeCallback
import org.koin.dsl.bind import org.koin.dsl.bind
import redis.clients.jedis.JedisPooled
import redis.clients.jedis.UnifiedJedis
import javax.sql.DataSource import javax.sql.DataSource
fun Module.configureDIDataSource(config: Configuration) { fun Module.configureDIDataSource(config: Configuration) {
@@ -26,11 +24,6 @@ fun Module.configureDIDataSource(config: Configuration) {
} }
} bind DataSource::class } bind DataSource::class
// Redis (for Projections)
single {
JedisPooled(config.redisUrl)
} bind UnifiedJedis::class
// RabbitMQ (for EventBus) // RabbitMQ (for EventBus)
factory { factory {
ConnectionFactory().apply { ConnectionFactory().apply {
-5
View File
@@ -12,11 +12,6 @@ jwt {
secret = ${?JWT_SECRET} secret = ${?JWT_SECRET}
} }
redis {
url = "redis://localhost:6379"
url = ${?REDIS_URL}
}
postgresql { postgresql {
url = "jdbc:postgresql://localhost:5432/event-demo" url = "jdbc:postgresql://localhost:5432/event-demo"
url = ${?POSTGRESQL_URL} url = ${?POSTGRESQL_URL}
-2
View File
@@ -7,7 +7,5 @@ object Tag {
object RabbitMQ : Tag() object RabbitMQ : Tag()
object Redis : Tag()
object Concurrence : Tag() object Concurrence : Tag()
} }
@@ -1,21 +0,0 @@
package eventDemo.contexts.game.intrastructure.persistence.connectors
import eventDemo.Tag
import eventDemo.testHelpers.testKoinApplicationWithConfig
import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.equals.shouldBeEqual
import redis.clients.jedis.UnifiedJedis
class RedisTest :
FunSpec({
tags(Tag.Redis)
test("test connection with jedis") {
testKoinApplicationWithConfig {
get<UnifiedJedis>().also {
it.set("test", "test")
it.get("test") shouldBeEqual "test"
}
}
}
})
@@ -1,7 +1,6 @@
package eventDemo.testHelpers package eventDemo.testHelpers
import org.koin.core.Koin import org.koin.core.Koin
import redis.clients.jedis.UnifiedJedis
import javax.sql.DataSource import javax.sql.DataSource
fun DataSource.cleanEventSource() { fun DataSource.cleanEventSource() {
@@ -17,11 +16,6 @@ fun DataSource.cleanEventSource() {
} }
} }
fun UnifiedJedis.cleanProjections() {
flushAll()
}
fun Koin.cleanDataTest() { fun Koin.cleanDataTest() {
get<DataSource>().cleanEventSource() get<DataSource>().cleanEventSource()
get<UnifiedJedis>().cleanProjections()
} }