refactor: move redis host to environment variable

This commit is contained in:
Anthony Berg 2023-05-27 06:18:48 +01:00
parent fb5d963af8
commit 49a5430cc0
2 changed files with 4 additions and 2 deletions

View File

@ -10,5 +10,8 @@ POSTGRES_USER=USERNAME
POSTGRES_PASSWORD=PASSWORD POSTGRES_PASSWORD=PASSWORD
POSTGRES_DB=DB POSTGRES_DB=DB
# Redis
REDIS_URL= # URL to redis database (if running everything within docker compose, use "redis")
# Database URL (designed for Postgres, but designed on Prisma) # Database URL (designed for Postgres, but designed on Prisma)
DATABASE_URL= # "postgresql://USERNAME:PASSWORD@postgres:5432/DB?schema=ara&sslmode=prefer" DATABASE_URL= # "postgresql://USERNAME:PASSWORD@postgres:5432/DB?schema=ara&sslmode=prefer"

View File

@ -25,7 +25,6 @@ import { LogLevel, SapphireClient, container } from '@sapphire/framework';
import '@sapphire/plugin-scheduled-tasks/register'; import '@sapphire/plugin-scheduled-tasks/register';
import '@sapphire/plugin-logger/register'; import '@sapphire/plugin-logger/register';
import { PrismaClient } from '@prisma/client'; import { PrismaClient } from '@prisma/client';
import 'dotenv/config';
// Setting up the Sapphire client // Setting up the Sapphire client
const client = new SapphireClient({ const client = new SapphireClient({
@ -49,7 +48,7 @@ const client = new SapphireClient({
tasks: { tasks: {
bull: { bull: {
connection: { connection: {
host: 'redis', host: process.env.REDIS_URL,
}, },
}, },
}, },