Skip to content

Commit

Permalink
�컨테이너 스케줄링 (#206)
Browse files Browse the repository at this point in the history
* chore: cicd network

* chore: env file path

* chore: cd chroe

* fix: image prune

* fix: /t fix

* feat(#151): 컨테이너 동적 실행

* feat(#151): always docker run

* feat(#151): single container run

* build(#151): single version

* build(#151): always docker build

* build(#151): always docker cd modify

* build(#151): max container modify

* build(#151): always test build

* build(#151): main merge

* build(#151): release

* build(#151): console check

* build(#151): 3000 port release

* fix(#151): error attempt fix

* fix(#151): container memory reduce

* fix(#151): syncronize fix

* fix(#151): await push

* fix(#151): image rebuild

* test(#151): npm install network test

* fix(#151): concurrency

* fix(#151): queue seperate

* fix(#151): dockername change

* fix(#151): release container decrease

* fix(#151): docker queue modify

* build(#151): always test build

* build(#151): release version build

* build(#151): alwasy version test

* build(#151): alwasy version test

* build(#151): container increase

* build(#151): concurrency increase

* build(#151): concurrency decrease

* fix(#151): stream end

* fix(#151): stream end

* fix(#151): concurrency remove

* build(#151): sync db

* build(#151): drop  db

* fix(#151): dind

* fix(#151): docker network

* fix(#151): container network

* fix(#151): docker network

* fix(#151): dind

* fix(#151): dind install node

* fix(#151): dockerfile modify

* fix(#151): dockerfile modify

* fix(#151): network fix

* fix(#151): test alaways

* fix(#151): release deploy

* fix(#151): release deploy

* fix(#151): release deploy

* fix(#151): test deploy

* fix(#151): server port

* build(#151): release deploy

* build(#151): release deploy

* build(#151): release deploy

* fix(#151): log

* fix(#151): settime

* fix(#151): process exit

* fix(#151): log

* fix(#151): log

* fix(#151): docker excution log

* fix(#151): socket change

* fix(#151): example change

* fix(#151): queue change

* fix(#151): queue change

* fix(#151): stream end

* fix(#151): stream end

* fix(#151): controller example change

* fix(#151): fix

* fix(#151): fix

* chore(#151): concurrency increase

* feat(#151): single container 방식

* fix(#151): container name change

* feat(#151): multiple IO version

* feat(#151): multiple IO version

* fix(#151): release

* fix(#151): cd fix
  • Loading branch information
mjh000526 authored Dec 4, 2024
1 parent 0735c54 commit adbcdc5
Show file tree
Hide file tree
Showing 16 changed files with 652 additions and 380 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/be-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
docker rm froxy-container
fi
docker pull ${{ secrets.DOCKER_USERNAME }}/froxy-server:latest && \
docker run --network froxy-network -d --name froxy-container -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock ${{ secrets.DOCKER_USERNAME }}/froxy-server:latest
docker run --network host -d --name froxy-container -v /var/run/docker.sock:/var/run/docker.sock ${{ secrets.DOCKER_USERNAME }}/froxy-server:latest
docker image prune -f
"
1 change: 0 additions & 1 deletion .github/workflows/fe-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- deploy

jobs:
fe-cd:
runs-on: ubuntu-20.04
Expand Down
20 changes: 10 additions & 10 deletions apps/backend/src/config/queue.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { BullRootModuleOptions } from '@nestjs/bull';
import { ConfigService } from '@nestjs/config';

export const queueConfig = (configService: ConfigService): BullRootModuleOptions => ({
redis: {
host: configService.get<string>('REDIS_HOST', { infer: true }),
port: configService.get<number>('REDIS_PORT', { infer: true }),
password: configService.get<string>('REDIS_PASSWORD', { infer: true })
}
});
import { BullRootModuleOptions } from '@nestjs/bull';
import { ConfigService } from '@nestjs/config';

export const queueConfig = (configService: ConfigService): BullRootModuleOptions => ({
redis: {
host: configService.get<string>('REDIS_HOST', { infer: true }),
port: configService.get<number>('REDIS_PORT', { infer: true }),
password: configService.get<string>('REDIS_PASSWORD', { infer: true })
}
});
1 change: 1 addition & 0 deletions apps/backend/src/config/typeorm.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ export const typeORMConfig = async (configService: ConfigService): Promise<TypeO
password: configService.get<string>('MYSQL_PASSWORD'),
database: configService.get<string>('MYSQL_DATABASE'),
entities: [User, Lotus, Comment, Tag, History, LotusTag]
//dropSchema: true,
//synchronize: true //todo: env로 release에서는 false가 되도록 해야함
});
38 changes: 19 additions & 19 deletions apps/backend/src/constants/constants.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
export const GIST_AUTH_HEADER = (gitToken: string = null) => {
return {
Accept: 'application/vnd.github+json',
Authorization: `Bearer ${gitToken}`,
'X-GitHub-Api-Version': '2022-11-28',
'Content-Type': 'application/json'
};
};
export enum HISTORY_STATUS {
PENDING = 'PENDING',
ERROR = 'ERROR',
SUCCESS = 'SUCCESS'
}

export enum SUPPORTED_LANGUAGES {
JS = '.js'
}

export const MAX_CONTAINER_CNT = 6;
export const GIST_AUTH_HEADER = (gitToken: string = null) => {
return {
Accept: 'application/vnd.github+json',
Authorization: `Bearer ${gitToken}`,
'X-GitHub-Api-Version': '2022-11-28',
'Content-Type': 'application/json'
};
};
export enum HISTORY_STATUS {
PENDING = 'PENDING',
ERROR = 'ERROR',
SUCCESS = 'SUCCESS'
}

export enum SUPPORTED_LANGUAGES {
JS = '.js'
}

export const MAX_CONTAINER_CNT = 10;
Loading

0 comments on commit adbcdc5

Please sign in to comment.