File tree Expand file tree Collapse file tree 6 files changed +9
-6
lines changed
Expand file tree Collapse file tree 6 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ services:
22 redis :
33 image : redis:latest
44 ports :
5- - " 6379 :6379"
5+ - " 6377 :6379"
66
77 producer :
88 build : ./producer
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ RUN npm install
99COPY . .
1010
1111ENV PORT=5005
12-
12+ ENV REDIS_PORT=6377
1313ENV WS_SERVER_URL='http://10.0.2.2:4455'
1414
1515EXPOSE 5005
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ const PORT = process.env.PORT || 4455;
1313// Supported languages
1414const SUPPORTED_LANGUAGES = [ "javascript" , "python" ] ;
1515
16- const connection = new IORedis ( "redis://redis:6379" , {
16+ const REDIS_PORT = process . env . REDIS_PORT || 6379 ;
17+ const connection = new IORedis ( `redis://redis:${ REDIS_PORT } ` , {
1718 maxRetriesPerRequest : null ,
1819} ) ;
1920
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ COPY package*.json ./
55
66ENV SUPABASE_URL='https://kafnsbymonfgbjwzwngz.supabase.co'
77ENV SUPABASE_ANON_KEY='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImthZm5zYnltb25mZ2Jqd3p3bmd6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTM1MjcxMDUsImV4cCI6MjA2OTEwMzEwNX0.o2HtzKtDP19_JLLAJkKwyRIxzGsB_AD57or4469Onwo'
8+ ENV REDIS_PORT=6377
89
910RUN npm install
1011CMD ["node", "index.js"]
Original file line number Diff line number Diff line change 1+ import dotenv from "dotenv" ;
2+ dotenv . config ( ) ;
13import { Worker } from "bullmq" ;
24import IORedis from "ioredis" ;
35import os from "os" ;
@@ -11,7 +13,8 @@ const execPromise = promisify(exec);
1113const LANGUAGE = "javascript" ;
1214const QUEUE_NAME = "js-code-execution" ;
1315
14- const connection = new IORedis ( "redis://redis:6379" , {
16+ const REDIS_PORT = process . env . REDIS_PORT || 6379 ;
17+ const connection = new IORedis ( `redis://redis:${ REDIS_PORT } ` , {
1518 maxRetriesPerRequest : null ,
1619} ) ;
1720
Original file line number Diff line number Diff line change 11import { createClient } from "@supabase/supabase-js" ;
2- import { config } from "dotenv" ;
3- config ( ) ;
42
53const supabaseUrl = process . env . SUPABASE_URL ;
64const supabaseAnonKey = process . env . SUPABASE_ANON_KEY ;
You can’t perform that action at this time.
0 commit comments