From e955afefdd47a147c9b7d2470f05c48f938d23dd Mon Sep 17 00:00:00 2001 From: mjh000526 <50985929+mjh000526@users.noreply.github.com> Date: Wed, 13 Nov 2024 10:21:43 +0900 Subject: [PATCH] =?UTF-8?q?git=20action=20=EC=9C=BC=EB=A1=9C=20cicd=20?= =?UTF-8?q?=EA=B5=AC=EC=B6=95=20(#41)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(#35): pnpm install * feat(#35): git action workflows * fix(#35): ci command line fix * fix(#35): ci command line fix * fix(#35): feature branch deployment add to test * fix(#35): fix to not found pnpm * fix(#35): sync pnpm-lockfile * fix(#35): dockerFile build command fix * fix(#35): docker file fix * fix(#35): change workdirectory to /backend * fix(#35): pnpm install command change * feat(#35): docker image version fix * fix(#35): docker image name tag fix * fix(#35): docker push tag name fix * fix(#35): image name fix * fix(#35): image name fix * fix(#35): cd docker command delete sudo * fix(#35): server setting fix * fix(#35): docker tag fix * fix(#35): container remove logic fix * fix(#35): docker run imagename fix * fix(#35): docker image prune * feat(#35): pr be label filtering * fix(#35): label sync * fix(#35): pull request --- .github/workflows/cd.yml | 54 +++++++++++++++++ .github/workflows/ci.yml | 49 +++++++++++++++ Dockerfile | 19 ++++++ apps/backend/package.json | 3 - apps/backend/src/app.module.ts | 7 ++- apps/backend/src/docker/docker.controller.ts | 10 ++-- apps/backend/src/docker/docker.service.ts | 4 +- apps/backend/test/app.e2e-spec.ts | 9 +-- ....timestamp-1731397235209-ff03ed3f3f3a4.mjs | 60 +++++++++++++++++++ ....timestamp-1731397318219-e73731b71ce51.mjs | 60 +++++++++++++++++++ pnpm-lock.yaml | 9 --- 11 files changed, 256 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/cd.yml create mode 100644 .github/workflows/ci.yml create mode 100644 Dockerfile create mode 100644 packages/react-markdown/vite.config.ts.timestamp-1731397235209-ff03ed3f3f3a4.mjs create mode 100644 packages/react-markdown/vite.config.ts.timestamp-1731397318219-e73731b71ce51.mjs diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 00000000..20f3a102 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,54 @@ +name: froxy Continuous Delivery + +on: + push: + branches: + - release # release 브랜치에 푸시될 때 실행 + +jobs: + build_and_deploy: + runs-on: ubuntu-20.04 # 빌드가 진행될 환경 설정 + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} # DockerHub 사용자 이름 + password: ${{ secrets.DOCKER_PASSWORD }} # DockerHub 비밀번호 + + #이미지 이름 저장 + - name: Set Docker image tag as a variable + run: echo "DOCKER_TAG=${{ secrets.DOCKER_USERNAME }}/froxy-server:latest" >> $GITHUB_ENV + + - name: Create .env file + run: | + echo "${{ secrets.BE_ENV }}" > .env + - name: Build Docker image + run: | + docker build -t $DOCKER_TAG . + + - name: Push Docker image to Docker Hub + run: | + docker push $DOCKER_TAG + + - name: Setup SSH + uses: webfactory/ssh-agent@v0.5.3 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + + - name: Deploy + run: | + ssh -o StrictHostKeyChecking=no mun@211.188.48.24 " + if [ \$(docker ps -a -q -f name=froxy-container) ]; then + docker stop froxy-container + docker rm froxy-container + fi + docker pull $DOCKER_TAG && \ + docker run -d --name froxy-container -p 3000:3000 ${{ secrets.DOCKER_USERNAME }}/froxy-server:latest" + docker image prune -f diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..7725d330 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: Froxy Continuous Integration + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + ci: + runs-on: ubuntu-20.04 + if: contains(github.event.pull_request.labels.*.name, '💻 Be') + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 9 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' # 적절한 Node.js 버전으로 설정 + cache: 'pnpm' # pnpm 캐싱 활성화 + + - name: Create .env file + run: | + echo "${{ secrets.BE_ENV }}" > ./apps/backend/.env + + - name: Install dependencies #라이브러리설치 + run: | + pnpm install + + - name: Run lint & Turbo build + run: | + pnpm lint --filter=backend + pnpm turbo run build --filter=backend + #FE CI : pnpm turbo run build --filter=frontend + #전역 CI : pnpm turbo run build + + #테스트코드 빌드는 테스트코드를 추가할때 사용 + #- name: Run Turbo tests + # run: | + # pnpm turbo run test --filter=be diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..4de87a2a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM node:20 + +WORKDIR /app + + +COPY package*.json ./ +RUN npm install -g pnpm + +COPY . . + +RUN pnpm install + +RUN pnpm lint --filter=backend && pnpm turbo run build --filter=backend + +WORKDIR /app/apps/backend +CMD ["pnpm", "run", "start:prod"] + +# 외부에서 접근할 수 있도록 포트 노출 +EXPOSE 3000 diff --git a/apps/backend/package.json b/apps/backend/package.json index ce715134..47db1c4e 100644 --- a/apps/backend/package.json +++ b/apps/backend/package.json @@ -29,13 +29,10 @@ "@nestjs/common": "^10.0.0", "@nestjs/core": "^10.0.0", "@nestjs/platform-express": "^10.0.0", - "ansi-regex": "^6.1.0", "dockerode": "^4.0.2", "dotenv": "^16.4.5", "reflect-metadata": "^0.1.13", "rxjs": "^7.8.1", - "strip-ansi": "^7.1.0", - "strip-ansi-cjs": "^8.0.0", "tar-stream": "^3.1.7" }, "devDependencies": { diff --git a/apps/backend/src/app.module.ts b/apps/backend/src/app.module.ts index b00d8036..9453ac05 100644 --- a/apps/backend/src/app.module.ts +++ b/apps/backend/src/app.module.ts @@ -1,16 +1,17 @@ import { Module } from '@nestjs/common'; +import { ConfigModule } from '@nestjs/config'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { DockerModule } from './docker/docker.module'; -import { ConfigModule } from "@nestjs/config" @Module({ imports: [ ConfigModule.forRoot({ isGlobal: true, - envFilePath: '.env', + envFilePath: '.env' }), - DockerModule], + DockerModule + ], controllers: [AppController], providers: [AppService] }) diff --git a/apps/backend/src/docker/docker.controller.ts b/apps/backend/src/docker/docker.controller.ts index 51dc6782..f86b94b4 100644 --- a/apps/backend/src/docker/docker.controller.ts +++ b/apps/backend/src/docker/docker.controller.ts @@ -1,20 +1,20 @@ import { Controller, Get, Param } from '@nestjs/common'; -import { DockerService } from './docker.service.js'; import { ConfigService } from '@nestjs/config'; +import { DockerService } from './docker.service.js'; @Controller('docker') export class DockerController { constructor(private readonly dockerService: DockerService, private configService: ConfigService) {} @Get('get') - async getDockersTest(): Promise{ + async getDockersTest(): Promise { const mainFileName = 'FunctionDivide.js'; // const gitToken = this.configService.get('STATIC_GIST_ID'); const gistId = this.configService.get('DYNAMIC_GIST_ID'); const gitToken = this.configService.get('GIT_TOKEN'); console.log(gitToken); - const inputs = ["1 1 1 1","1 1 1 1","1 1 1 1","1 1 1 1"]; - const value = await this.dockerService.getDocker(gitToken, gistId, mainFileName,inputs); - return value + const inputs = ['1 1 1 1', '1 1 1 1', '1 1 1 1', '1 1 1 1']; + const value = await this.dockerService.getDocker(gitToken, gistId, mainFileName, inputs); + return value; } } diff --git a/apps/backend/src/docker/docker.service.ts b/apps/backend/src/docker/docker.service.ts index b5c869ba..9ab7a97e 100644 --- a/apps/backend/src/docker/docker.service.ts +++ b/apps/backend/src/docker/docker.service.ts @@ -1,9 +1,9 @@ import { Injectable } from '@nestjs/common'; import * as Docker from 'dockerode'; import { Container } from 'dockerode'; -import * as tar from 'tar-stream'; -import * as path from 'path'; import { promises as fs } from 'fs'; +import * as path from 'path'; +import * as tar from 'tar-stream'; interface GistFileAttributes { filename: string; diff --git a/apps/backend/test/app.e2e-spec.ts b/apps/backend/test/app.e2e-spec.ts index 50cda623..def87095 100644 --- a/apps/backend/test/app.e2e-spec.ts +++ b/apps/backend/test/app.e2e-spec.ts @@ -1,5 +1,5 @@ -import { Test, TestingModule } from '@nestjs/testing'; import { INestApplication } from '@nestjs/common'; +import { Test, TestingModule } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from './../src/app.module'; @@ -8,7 +8,7 @@ describe('AppController (e2e)', () => { beforeEach(async () => { const moduleFixture: TestingModule = await Test.createTestingModule({ - imports: [AppModule], + imports: [AppModule] }).compile(); app = moduleFixture.createNestApplication(); @@ -16,9 +16,6 @@ describe('AppController (e2e)', () => { }); it('/ (GET)', () => { - return request(app.getHttpServer()) - .get('/') - .expect(200) - .expect('Hello World!'); + return request(app.getHttpServer()).get('/').expect(200).expect('Hello World!'); }); }); diff --git a/packages/react-markdown/vite.config.ts.timestamp-1731397235209-ff03ed3f3f3a4.mjs b/packages/react-markdown/vite.config.ts.timestamp-1731397235209-ff03ed3f3f3a4.mjs new file mode 100644 index 00000000..263e9ea1 --- /dev/null +++ b/packages/react-markdown/vite.config.ts.timestamp-1731397235209-ff03ed3f3f3a4.mjs @@ -0,0 +1,60 @@ +// vite.config.ts +import react from "file:///Users/munjunho/Desktop/BC-project/web38-Froxy/node_modules/.pnpm/@vitejs+plugin-react-swc@3.7.1_vite@5.4.10_@types+node@20.17.5_terser@5.36.0_/node_modules/@vitejs/plugin-react-swc/index.mjs"; +import { resolve } from "path"; +import { defineConfig } from "file:///Users/munjunho/Desktop/BC-project/web38-Froxy/node_modules/.pnpm/vite@5.4.10_@types+node@20.17.5_terser@5.36.0/node_modules/vite/dist/node/index.js"; +import dts from "file:///Users/munjunho/Desktop/BC-project/web38-Froxy/node_modules/.pnpm/vite-plugin-dts@4.3.0_@types+node@20.17.5_rollup@4.24.3_typescript@5.6.3_vite@5.4.10_@types+node@20.17.5_terser@5.36.0_/node_modules/vite-plugin-dts/dist/index.mjs"; +import tsconfigPaths from "file:///Users/munjunho/Desktop/BC-project/web38-Froxy/node_modules/.pnpm/vite-tsconfig-paths@5.0.1_typescript@5.6.3_vite@5.4.10_@types+node@20.17.5_terser@5.36.0_/node_modules/vite-tsconfig-paths/dist/index.js"; +var __vite_injected_original_dirname = "/Users/munjunho/Desktop/BC-project/web38-Froxy/packages/react-markdown"; +var vite_config_default = defineConfig({ + base: "./", + test: { + globals: true, + environment: "jsdom", + setupFiles: ["./src/test/setupTests.ts"] + }, + resolve: { + alias: { + "@": resolve(__vite_injected_original_dirname, "./src") + } + }, + build: { + lib: { + entry: resolve(__vite_injected_original_dirname, "src/index.ts"), + name: "@froxy/react-markdown", + formats: ["es"], + // 포맷 추가 + fileName: (format) => `index.${format}.js` + // 포맷별 파일명 + }, + rollupOptions: { + external: ["react", "react-dom"], + output: { + globals: { + react: "React", + "react-dom": "ReactDOM" + }, + exports: "named", + // named exports 설정 + chunkFileNames: "chunks/[name].js", + assetFileNames: "assets/[name].[ext]", + entryFileNames: "[name].js", + manualChunks: void 0, + inlineDynamicImports: false + } + } + }, + plugins: [ + react(), + tsconfigPaths(), + dts({ + tsconfigPath: "./tsconfig.app.json", + include: ["src"], + rollupTypes: true + // 타입 번들링 + }) + ] +}); +export { + vite_config_default as default +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvbXVuanVuaG8vRGVza3RvcC9CQy1wcm9qZWN0L3dlYjM4LUZyb3h5L3BhY2thZ2VzL3JlYWN0LW1hcmtkb3duXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCIvVXNlcnMvbXVuanVuaG8vRGVza3RvcC9CQy1wcm9qZWN0L3dlYjM4LUZyb3h5L3BhY2thZ2VzL3JlYWN0LW1hcmtkb3duL3ZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXR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FBSztBQUFBLE1BQ2YsYUFBYTtBQUFBO0FBQUEsSUFDZixDQUFDO0FBQUEsRUFDSDtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg== diff --git a/packages/react-markdown/vite.config.ts.timestamp-1731397318219-e73731b71ce51.mjs b/packages/react-markdown/vite.config.ts.timestamp-1731397318219-e73731b71ce51.mjs new file mode 100644 index 00000000..263e9ea1 --- /dev/null +++ b/packages/react-markdown/vite.config.ts.timestamp-1731397318219-e73731b71ce51.mjs @@ -0,0 +1,60 @@ +// vite.config.ts +import react from "file:///Users/munjunho/Desktop/BC-project/web38-Froxy/node_modules/.pnpm/@vitejs+plugin-react-swc@3.7.1_vite@5.4.10_@types+node@20.17.5_terser@5.36.0_/node_modules/@vitejs/plugin-react-swc/index.mjs"; +import { resolve } from "path"; +import { defineConfig } from "file:///Users/munjunho/Desktop/BC-project/web38-Froxy/node_modules/.pnpm/vite@5.4.10_@types+node@20.17.5_terser@5.36.0/node_modules/vite/dist/node/index.js"; +import dts from "file:///Users/munjunho/Desktop/BC-project/web38-Froxy/node_modules/.pnpm/vite-plugin-dts@4.3.0_@types+node@20.17.5_rollup@4.24.3_typescript@5.6.3_vite@5.4.10_@types+node@20.17.5_terser@5.36.0_/node_modules/vite-plugin-dts/dist/index.mjs"; +import tsconfigPaths from "file:///Users/munjunho/Desktop/BC-project/web38-Froxy/node_modules/.pnpm/vite-tsconfig-paths@5.0.1_typescript@5.6.3_vite@5.4.10_@types+node@20.17.5_terser@5.36.0_/node_modules/vite-tsconfig-paths/dist/index.js"; +var __vite_injected_original_dirname = "/Users/munjunho/Desktop/BC-project/web38-Froxy/packages/react-markdown"; +var vite_config_default = defineConfig({ + base: "./", + test: { + globals: true, + environment: "jsdom", + setupFiles: ["./src/test/setupTests.ts"] + }, + resolve: { + alias: { + "@": resolve(__vite_injected_original_dirname, "./src") + } + }, + build: { + lib: { + entry: resolve(__vite_injected_original_dirname, "src/index.ts"), + name: "@froxy/react-markdown", + formats: ["es"], + // 포맷 추가 + fileName: (format) => `index.${format}.js` + // 포맷별 파일명 + }, + rollupOptions: { + external: ["react", "react-dom"], + output: { + globals: { + react: "React", + "react-dom": "ReactDOM" + }, + exports: "named", + // named exports 설정 + chunkFileNames: "chunks/[name].js", + assetFileNames: "assets/[name].[ext]", + entryFileNames: "[name].js", + manualChunks: void 0, + inlineDynamicImports: false + } + } + }, + plugins: [ + react(), + tsconfigPaths(), + dts({ + tsconfigPath: "./tsconfig.app.json", + include: ["src"], + rollupTypes: true + // 타입 번들링 + }) + ] +}); +export { + vite_config_default as default +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvbXVuanVuaG8vRGVza3RvcC9CQy1wcm9qZWN0L3dlYjM4LUZyb3h5L3BhY2thZ2VzL3JlYWN0LW1hcmtkb3duXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCIvVXNlcnMvbXVuanVuaG8vRGVza3RvcC9CQy1wcm9qZWN0L3dlYjM4LUZyb3h5L3BhY2thZ2VzL3JlYWN0LW1hcmtkb3duL3ZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9Vc2Vycy9tdW5qdW5oby9EZXNrdG9wL0JDLXByb2plY3Qvd2ViMzgtRnJveHkvcGFja2FnZXMvcmVhY3QtbWFya2Rvd24vdml0ZS5jb25maWcudHNcIjsvLy8gPHJlZmVyZW5jZSB0eXBlcz1cInZpdGVzdFwiIC8+XG5cbmltcG9ydCByZWFjdCBmcm9tICdAdml0ZWpzL3BsdWdpbi1yZWFjdC1zd2MnO1xuaW1wb3J0IHs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NQUNMLEtBQUssUUFBUSxrQ0FBVyxPQUFPO0FBQUEsSUFDakM7QUFBQSxFQUNGO0FBQUEsRUFDQSxPQUFPO0FBQUEsSUFDTCxLQUFLO0FBQUEsTUFDSCxPQUFPLFFBQVEsa0NBQVcsY0FBYztBQUFBLE1BQ3hDLE1BQU07QUFBQSxNQUNOLFNBQVMsQ0FBQyxJQUFJO0FBQUE7QUFBQSxNQUNkLFVBQVUsQ0FBQyxXQUFXLFNBQVMsTUFBTTtBQUFBO0FBQUEsSUFDdkM7QUFBQSxJQUNBLGVBQWU7QUFBQSxNQUNiLFVBQVUsQ0FBQyxTQUFTLFdBQVc7QUFBQSxNQUMvQixRQUFRO0FBQUEsUUFDTixTQUFTO0FBQUEsVUFDUCxPQUFPO0FBQUEsVUFDUCxhQUFhO0FBQUEsUUFDZjtBQUFBLFFBQ0EsU0FBUztBQUFBO0FBQUEsUUFDVCxnQkFBZ0I7QUFBQSxRQUNoQixnQkFBZ0I7QUFBQSxRQUNoQixnQkFBZ0I7QUFBQSxRQUNoQixjQUFjO0FBQUEsUUFDZCxzQkFBc0I7QUFBQSxNQUN4QjtBQUFBLElBQ0Y7QUFBQSxFQUNGO0FBQUEsRUFFQSxTQUFTO0FBQUEsSUFDUCxNQUFNO0FBQUEsSUFDTixjQUFjO0FBQUEsSUFDZCxJQUFJO0FBQUEsTUFDRixjQUFjO0FBQUEsTUFDZCxTQUFTLENBQUMsS0FBSztBQUFBLE1BQ2YsYUFBYTtBQUFBO0FBQUEsSUFDZixDQUFDO0FBQUEsRUFDSDtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg== diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 351f1f05..6864d789 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,9 +35,6 @@ importers: '@nestjs/platform-express': specifier: ^10.0.0 version: 10.4.6(@nestjs/common@10.4.6(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@10.4.6) - ansi-regex: - specifier: ^6.1.0 - version: 6.1.0 dockerode: specifier: ^4.0.2 version: 4.0.2 @@ -50,12 +47,6 @@ importers: rxjs: specifier: ^7.8.1 version: 7.8.1 - strip-ansi: - specifier: ^7.1.0 - version: 7.1.0 - strip-ansi-cjs: - specifier: ^8.0.0 - version: 8.0.0 tar-stream: specifier: ^3.1.7 version: 3.1.7