Add redis and basic frontend for viewing data

This commit is contained in:
Mike Conrad
2025-05-19 11:07:03 -04:00
parent f12cdbf76a
commit a96b9f2c8b
10 changed files with 258 additions and 20 deletions

36
config/redis.ts Normal file
View File

@ -0,0 +1,36 @@
import env from '#start/env'
import { defineConfig } from '@adonisjs/redis'
import { InferConnections } from '@adonisjs/redis/types'
const redisConfig = defineConfig({
connection: 'main',
connections: {
/*
|--------------------------------------------------------------------------
| The default connection
|--------------------------------------------------------------------------
|
| The main connection you want to use to execute redis commands. The same
| connection will be used by the session provider, if you rely on the
| redis driver.
|
*/
main: {
host: 'sentry-redis-1',
port: env.get('REDIS_PORT'),
password: env.get('REDIS_PASSWORD', ''),
db: 0,
keyPrefix: '',
retryStrategy(times) {
return times > 10 ? null : times * 50
},
},
},
})
export default redisConfig
declare module '@adonisjs/redis/types' {
export interface RedisConnections extends InferConnections<typeof redisConfig> {}
}