Skip to content

Commit e0cda8d

Browse files
modified yml
1 parent bcfe050 commit e0cda8d

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

Compiler_Engine/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

Compiler_Engine/producer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN npm install
99
COPY . .
1010

1111
ENV PORT=5005
12-
12+
ENV REDIS_PORT=6377
1313
ENV WS_SERVER_URL='http://10.0.2.2:4455'
1414

1515
EXPOSE 5005

Compiler_Engine/producer/producer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const PORT = process.env.PORT || 4455;
1313
// Supported languages
1414
const 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

Compiler_Engine/worker-js/dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ COPY package*.json ./
55

66
ENV SUPABASE_URL='https://kafnsbymonfgbjwzwngz.supabase.co'
77
ENV SUPABASE_ANON_KEY='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImthZm5zYnltb25mZ2Jqd3p3bmd6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTM1MjcxMDUsImV4cCI6MjA2OTEwMzEwNX0.o2HtzKtDP19_JLLAJkKwyRIxzGsB_AD57or4469Onwo'
8+
ENV REDIS_PORT=6377
89

910
RUN npm install
1011
CMD ["node", "index.js"]

Compiler_Engine/worker-js/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import dotenv from "dotenv";
2+
dotenv.config();
13
import { Worker } from "bullmq";
24
import IORedis from "ioredis";
35
import os from "os";
@@ -11,7 +13,8 @@ const execPromise = promisify(exec);
1113
const LANGUAGE = "javascript";
1214
const 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

Compiler_Engine/worker-js/utils/supabaseClient.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import { createClient } from "@supabase/supabase-js";
2-
import { config } from "dotenv";
3-
config();
42

53
const supabaseUrl = process.env.SUPABASE_URL;
64
const supabaseAnonKey = process.env.SUPABASE_ANON_KEY;

0 commit comments

Comments
 (0)