From 3c7251a653a773cbe0a5a4599429b0092e97c6da Mon Sep 17 00:00:00 2001 From: mjh000526 Date: Tue, 3 Dec 2024 10:53:30 +0900 Subject: [PATCH] fix(#151): dockername change --- apps/backend/src/constants/constants.ts | 2 +- apps/backend/src/docker/docker.pool.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/backend/src/constants/constants.ts b/apps/backend/src/constants/constants.ts index 1fa1b64..0a847d8 100644 --- a/apps/backend/src/constants/constants.ts +++ b/apps/backend/src/constants/constants.ts @@ -16,4 +16,4 @@ export enum SUPPORTED_LANGUAGES { JS = '.js' } -export const MAX_CONTAINER_CNT = 10; +export const MAX_CONTAINER_CNT = 5; diff --git a/apps/backend/src/docker/docker.pool.ts b/apps/backend/src/docker/docker.pool.ts index a449588..d208cf2 100644 --- a/apps/backend/src/docker/docker.pool.ts +++ b/apps/backend/src/docker/docker.pool.ts @@ -17,7 +17,7 @@ export class DockerContainerPool implements OnApplicationBootstrap { const containersToDelete = await this.docker.listContainers({ all: true }); await Promise.all( containersToDelete - .filter((container) => container.Names.some((name) => name.startsWith('/froxy-run'))) + .filter((container) => container.Names.some((name) => name.startsWith('/froxy-always'))) .map(async (container) => { const removeContainer = await this.docker.getContainer(container.Id); await removeContainer.remove({ force: true }); @@ -55,7 +55,7 @@ export class DockerContainerPool implements OnApplicationBootstrap { 'NODE_DISABLE_COLORS=true', // 색상 비활성화 'TERM=dumb' // dumb 터미널로 설정하여 색상 비활성화 ], - name: `froxy-run${i + 1}`, + name: `froxy-always${i + 1}`, HostConfig: { Memory: (1024 * 1024 * 1024) / 2, // 1GB 메모리 제한 MemorySwap: (1024 * 1024 * 1024) / 2 // swap 메모리도 1GB로 설정