diff --git a/.env.example b/.env.example index d64f24e..8ac0a57 100644 --- a/.env.example +++ b/.env.example @@ -10,5 +10,8 @@ POSTGRES_USER=USERNAME POSTGRES_PASSWORD=PASSWORD 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= # "postgresql://USERNAME:PASSWORD@postgres:5432/DB?schema=ara&sslmode=prefer" diff --git a/src/index.ts b/src/index.ts index 4150f2f..2208d49 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,7 +25,6 @@ import { LogLevel, SapphireClient, container } from '@sapphire/framework'; import '@sapphire/plugin-scheduled-tasks/register'; import '@sapphire/plugin-logger/register'; import { PrismaClient } from '@prisma/client'; -import 'dotenv/config'; // Setting up the Sapphire client const client = new SapphireClient({ @@ -49,7 +48,7 @@ const client = new SapphireClient({ tasks: { bull: { connection: { - host: 'redis', + host: process.env.REDIS_URL, }, }, },