feat: Add Health and Login endpoints with updated Redis configuration

This commit is contained in:
2026-01-07 15:23:59 +01:00
parent edcab594a7
commit 4a5af36ae0
5 changed files with 23 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
meta {
name: Game
seq: 3
seq: 2
}
auth {

View File

@@ -0,0 +1,16 @@
meta {
name: Health
type: http
seq: 3
}
get {
url: {{host}}/health/simple
body: none
auth: inherit
}
settings {
encodeUrl: true
timeout: 0
}

View File

@@ -0,0 +1,3 @@
vars {
host: https://st.knockout.janis-eccarius.de/api
}

View File

@@ -22,14 +22,14 @@ class Gateway @Inject()(
val redis: RedisManager = {
val config: Config = Config()
val url = "valkey://" + sys.env.getOrElse("VALKEY_HOST", "localhost") + ":" + sys.env.getOrElse("VALKEY_PORT", "6379")
logger.info(s"Connecting to Valkey at $url")
val url = "redis://" + sys.env.getOrElse("REDIS_HOST", "localhost") + ":" + sys.env.getOrElse("REDIS_PORT", "6379")
logger.info(s"Connecting to Redis at $url")
config.useSingleServer.setAddress(url)
RedisManager(config)
}
redis.continuousSyncPod(() => {
logger.info("Syncing pod with Valkey")
logger.info("Syncing pod with Redis")
createPod()
})