feat: use managed Valkey with per-customer key prefix instead of in-cluster valkey
Some checks failed
Build & Release / build (push) Has been cancelled
Some checks failed
Build & Release / build (push) Has been cancelled
This commit is contained in:
@@ -7,6 +7,7 @@ export const config = {
|
||||
dbUrl: process.env.DATABASE_URL!,
|
||||
doadminDbUrl: process.env.DOADMIN_DATABASE_URL!,
|
||||
jwtSecret: process.env.JWT_SECRET!,
|
||||
managedValkeyUrl: process.env.MANAGED_VALKEY_URL!,
|
||||
};
|
||||
|
||||
for (const [key, val] of Object.entries(config)) {
|
||||
|
||||
@@ -113,11 +113,11 @@ export async function customerRoutes(app: FastifyInstance) {
|
||||
});
|
||||
const jwtSecret = crypto.randomBytes(32).toString("hex");
|
||||
const databaseUrl = `postgresql://${slug}:${user.password}@${PGBOUNCER_HOST}:${PGBOUNCER_PORT}/${slug}`;
|
||||
const redisUrl = `redis://${namespace}-valkey:6379`;
|
||||
await createSecret(namespace, "lunarfront-secrets", {
|
||||
"database-url": databaseUrl,
|
||||
"jwt-secret": jwtSecret,
|
||||
"redis-url": redisUrl,
|
||||
"redis-url": config.managedValkeyUrl,
|
||||
"redis-key-prefix": slug,
|
||||
});
|
||||
await setStep("namespace", "done");
|
||||
await setStep("secrets", "done");
|
||||
|
||||
Reference in New Issue
Block a user