From d4f99070c6e70a32e05beb1052a7113a67ff2c04 Mon Sep 17 00:00:00 2001 From: NaGyeong Park Date: Mon, 21 Nov 2022 18:31:59 +0900 Subject: [PATCH 01/51] =?UTF-8?q?env:=20docker=20=EB=B0=8F=20client=20buil?= =?UTF-8?q?d=20github=20action=20=EB=93=B1=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 28 ++++++++++++++++++++++++++++ client/Dockerfile | 3 +++ 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/CLIENT_BUILD.yml create mode 100644 client/Dockerfile diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml new file mode 100644 index 0000000..621b13c --- /dev/null +++ b/.github/workflows/CLIENT_BUILD.yml @@ -0,0 +1,28 @@ +name: client build +on: + pull_request: + branches: + - main + - release + paths: + - "client/**" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: "18.x" + - name: Install & Test + run: | + cd client + yarn + yarn build + - name: web docker build and push + run: | + echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login https://ghcr.io/ -u outsideris --password-stdin + docker build --platform linux/amd64 -t ghcr.io/kumsil1006/oao . + docker push ghcr.io/kumsil1006/oao \ No newline at end of file diff --git a/client/Dockerfile b/client/Dockerfile new file mode 100644 index 0000000..066cd1e --- /dev/null +++ b/client/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx +COPY ./dist /dist +COPY ./default.conf /etc/nginx/conf.d/default.conf \ No newline at end of file From d804e394fb152327681477c527f0ba7c4e95a2b6 Mon Sep 17 00:00:00 2001 From: NaGyeong Park Date: Mon, 21 Nov 2022 18:46:50 +0900 Subject: [PATCH 02/51] =?UTF-8?q?fix:=20docker=20build=EB=A5=BC=20login=20?= =?UTF-8?q?=ED=9B=84=20=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index 621b13c..257f223 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -21,8 +21,11 @@ jobs: cd client yarn yarn build - - name: web docker build and push - run: | - echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login https://ghcr.io/ -u outsideris --password-stdin - docker build --platform linux/amd64 -t ghcr.io/kumsil1006/oao . - docker push ghcr.io/kumsil1006/oao \ No newline at end of file + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: kumsil1006 + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + - name: Build and push Docker images + uses: docker/build-push-action@v3.2.0 From acb5a949fe4ad1c8faed696fb59a9899c6f26c25 Mon Sep 17 00:00:00 2001 From: NaGyeong Park Date: Tue, 22 Nov 2022 10:02:09 +0900 Subject: [PATCH 03/51] =?UTF-8?q?fix:=20docker=20build=EC=8B=9C=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index 257f223..b435566 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -8,8 +8,15 @@ on: - "client/**" jobs: - build: + build-image: + name: client image runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - dockerfile: ./client/Dockerfile + image: nagyeong/test steps: - uses: actions/checkout@v2 - name: Setup Node @@ -29,3 +36,6 @@ jobs: password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - name: Build and push Docker images uses: docker/build-push-action@v3.2.0 + with: + context: . + file: ./client/Dockerfile From 848c57800d694e7be2884016358d0c7fa8efe214 Mon Sep 17 00:00:00 2001 From: NaGyeong Park Date: Tue, 22 Nov 2022 11:14:41 +0900 Subject: [PATCH 04/51] =?UTF-8?q?fix:=20docker=20context=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20client=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index b435566..bff0792 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -11,12 +11,6 @@ jobs: build-image: name: client image runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - dockerfile: ./client/Dockerfile - image: nagyeong/test steps: - uses: actions/checkout@v2 - name: Setup Node @@ -37,5 +31,4 @@ jobs: - name: Build and push Docker images uses: docker/build-push-action@v3.2.0 with: - context: . - file: ./client/Dockerfile + context: ./client From 8da51753e47380d9b768e457e8f99e9bf9c5071f Mon Sep 17 00:00:00 2001 From: NaGyeong Park Date: Tue, 22 Nov 2022 11:17:54 +0900 Subject: [PATCH 05/51] =?UTF-8?q?feat:=20client=20nginx=20configuration=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/default.conf | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 client/default.conf diff --git a/client/default.conf b/client/default.conf new file mode 100644 index 0000000..5727a22 --- /dev/null +++ b/client/default.conf @@ -0,0 +1,6 @@ +server { + listen 3000; + location / { + root /dist/; + } +} \ No newline at end of file From 4e27caa91739d535d3fb646fd9f108b389a4940e Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 11:30:46 +0900 Subject: [PATCH 06/51] =?UTF-8?q?fix:=20push=20option=20=ED=99=9C=EC=84=B1?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - push option 추가 및 tag 추가 --- .github/workflows/CLIENT_BUILD.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index bff0792..e5e0e76 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -31,4 +31,6 @@ jobs: - name: Build and push Docker images uses: docker/build-push-action@v3.2.0 with: + push: true + tags: ghcr.io/kumsil1006/oao:latest context: ./client From 6b8715c01d36cee1e94a5d5ae691dee6b4bafe88 Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 11:40:23 +0900 Subject: [PATCH 07/51] =?UTF-8?q?chore:=20nginx=20port=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD(test)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - docker build&push test --- client/default.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/default.conf b/client/default.conf index 5727a22..f4b5d54 100644 --- a/client/default.conf +++ b/client/default.conf @@ -1,6 +1,6 @@ server { - listen 3000; + listen 4000; location / { root /dist/; } -} \ No newline at end of file +} From 913df3052819555adfa4ad830fc7c489ecdb7712 Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 14:02:09 +0900 Subject: [PATCH 08/51] =?UTF-8?q?chore:=20docker=20container=20=EB=82=B4?= =?UTF-8?q?=EB=B6=80=EC=97=90=20vim=20=EC=84=A4=EC=B9=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/Dockerfile b/client/Dockerfile index 066cd1e..0ce425a 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,3 +1,5 @@ FROM nginx COPY ./dist /dist -COPY ./default.conf /etc/nginx/conf.d/default.conf \ No newline at end of file +COPY ./default.conf /etc/nginx/conf.d/default.conf + +RUN apt-get update && apt-get install vim -y From fb8e41b77d01e20cff114fba68a9eb18a3fc2123 Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 14:08:59 +0900 Subject: [PATCH 09/51] =?UTF-8?q?fix:=20FE=20=EC=A0=95=EC=A0=81=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20index=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/default.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/default.conf b/client/default.conf index f4b5d54..c3f2f6d 100644 --- a/client/default.conf +++ b/client/default.conf @@ -1,6 +1,7 @@ server { - listen 4000; + listen 3000; location / { - root /dist/; + root /dist; + index index.html index.htm; } } From 9e339e6c675539da1cfe55579cd8dcf7eb846419 Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 14:20:23 +0900 Subject: [PATCH 10/51] =?UTF-8?q?fix:=20nginx=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=9C=84=EC=B9=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/Dockerfile b/client/Dockerfile index 0ce425a..4745dd9 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,5 +1,5 @@ FROM nginx COPY ./dist /dist -COPY ./default.conf /etc/nginx/conf.d/default.conf +COPY ./default.conf /etc/nginx/nginx.conf RUN apt-get update && apt-get install vim -y From 4c484cc997f5ad30eb237bb3545ede4f93ada440 Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 14:24:32 +0900 Subject: [PATCH 11/51] =?UTF-8?q?fix:=20default.conf=20=EC=9C=84=EC=B9=98?= =?UTF-8?q?=20=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/Dockerfile b/client/Dockerfile index 4745dd9..0ce425a 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,5 +1,5 @@ FROM nginx COPY ./dist /dist -COPY ./default.conf /etc/nginx/nginx.conf +COPY ./default.conf /etc/nginx/conf.d/default.conf RUN apt-get update && apt-get install vim -y From 3cb7538f3016d7e8ad4bd4e60e87704bc8748272 Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 15:06:48 +0900 Subject: [PATCH 12/51] fix: change docker image name --- .github/workflows/CLIENT_BUILD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index e5e0e76..2cbba9b 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -32,5 +32,5 @@ jobs: uses: docker/build-push-action@v3.2.0 with: push: true - tags: ghcr.io/kumsil1006/oao:latest + tags: ghcr.io/kumsil1006/oao-client:latest context: ./client From 9e10000c735971606f11d95698f82e612f7a166a Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 15:10:05 +0900 Subject: [PATCH 13/51] =?UTF-8?q?fix:=20package=20=EC=9D=B4=EB=A6=84=20?= =?UTF-8?q?=EC=9B=90=EB=B3=B5=20=EB=B0=8F=20tag=EC=9D=B4=EB=A6=84=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index 2cbba9b..0aace4e 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -32,5 +32,5 @@ jobs: uses: docker/build-push-action@v3.2.0 with: push: true - tags: ghcr.io/kumsil1006/oao-client:latest + tags: ghcr.io/kumsil1006/oao:oao-client context: ./client From 6b6b0250ae47983ce41596fb926218e8316009ac Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 15:13:56 +0900 Subject: [PATCH 14/51] =?UTF-8?q?feat:=20server=20build=20action=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/SERVER_BUILD.yml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/SERVER_BUILD.yml diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml new file mode 100644 index 0000000..d9b9caf --- /dev/null +++ b/.github/workflows/SERVER_BUILD.yml @@ -0,0 +1,31 @@ +name: server build +on: + pull_request: + branches: + - main + - release + paths: + - "server/**" + +jobs: + build-image: + name: server image build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: "18.x" + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: kumsil1006 + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + - name: Build and push Docker images + uses: docker/build-push-action@v3.2.0 + with: + context: ./server + push: true + tags: ghcr.io/kumsil1006/oao:oao-server From 64b9931b13e8009dc4cbad1cb815165ffca0e024 Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 15:15:39 +0900 Subject: [PATCH 15/51] =?UTF-8?q?feat:=20server=20dockerfile=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 server/Dockerfile diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000..6f8660a --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,5 @@ +FROM node:18-alpine +WORKDIR /server +COPY package.json yarn.lock ./ +RUN yarn install --immutable --immutable-cache --check-cache +RUN yarn dev From 223ba8740cedb9cccecfb6bb0b71b022fc8f593b Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 15:23:46 +0900 Subject: [PATCH 16/51] =?UTF-8?q?fix:=20server=20dockerfile=20entry=20poin?= =?UTF-8?q?t=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 6f8660a..57f5e13 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -2,4 +2,4 @@ FROM node:18-alpine WORKDIR /server COPY package.json yarn.lock ./ RUN yarn install --immutable --immutable-cache --check-cache -RUN yarn dev +ENTRYPOINT [ "yarn", "dev" ] From 157064ff56aab3696ad16754f657f243550afb84 Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 15:30:48 +0900 Subject: [PATCH 17/51] chore: Docker Demon Port Mapping (EXPOSE) --- server/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/server/Dockerfile b/server/Dockerfile index 57f5e13..a34ebc2 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -2,4 +2,5 @@ FROM node:18-alpine WORKDIR /server COPY package.json yarn.lock ./ RUN yarn install --immutable --immutable-cache --check-cache +EXPOSE 8080 ENTRYPOINT [ "yarn", "dev" ] From 94f265578b08fc775442ca151b65a06116d330cc Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 15:45:24 +0900 Subject: [PATCH 18/51] =?UTF-8?q?chore:=20server=20tsconfig=20=EB=B0=8F=20?= =?UTF-8?q?package.json=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/package.json | 4 +++- server/tsconfig.json | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/package.json b/server/package.json index b41fcca..0c91bc7 100644 --- a/server/package.json +++ b/server/package.json @@ -5,7 +5,9 @@ "license": "MIT", "type": "module", "scripts": { - "dev": "nodemon --exec node --loader ts-node/esm index.ts" + "dev": "nodemon --exec node --loader ts-node/esm index.ts", + "build": "tsc -p .", + "start": "node dist/index.js" }, "devDependencies": { "@types/express": "^4.17.14", diff --git a/server/tsconfig.json b/server/tsconfig.json index cec8261..f00b6a2 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -12,6 +12,7 @@ "moduleResolution": "Node", "resolveJsonModule": true, "isolatedModules": true, - "noEmit": true + "outDir": "./dist", + "rootDir": ".", } } From dbaec13fbfe3135da782feefefb1a3514d1c7ebd Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 15:46:41 +0900 Subject: [PATCH 19/51] =?UTF-8?q?fix:=20server=20Dockerfile=20build=20comm?= =?UTF-8?q?ent=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index a34ebc2..c8b057e 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -3,4 +3,5 @@ WORKDIR /server COPY package.json yarn.lock ./ RUN yarn install --immutable --immutable-cache --check-cache EXPOSE 8080 -ENTRYPOINT [ "yarn", "dev" ] +RUN yarn build +ENTRYPOINT [ "yarn", "start" ] From 08d1b1be3d7f7a82a1cc56251af752b172cf24b6 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 15:51:28 +0900 Subject: [PATCH 20/51] =?UTF-8?q?fix:=20server=20running=20script=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/Dockerfile | 2 +- server/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index c8b057e..079b457 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -4,4 +4,4 @@ COPY package.json yarn.lock ./ RUN yarn install --immutable --immutable-cache --check-cache EXPOSE 8080 RUN yarn build -ENTRYPOINT [ "yarn", "start" ] +ENTRYPOINT [ "yarn", "server" ] diff --git a/server/package.json b/server/package.json index 0c91bc7..3827f7f 100644 --- a/server/package.json +++ b/server/package.json @@ -7,7 +7,7 @@ "scripts": { "dev": "nodemon --exec node --loader ts-node/esm index.ts", "build": "tsc -p .", - "start": "node dist/index.js" + "server": "node dist/index.js" }, "devDependencies": { "@types/express": "^4.17.14", From 1c00506567ce9ca6ea6c6c8b91de2c1301b00685 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:16:30 +0900 Subject: [PATCH 21/51] =?UTF-8?q?fix:=20server=20dockerfile=EC=97=90=20tsc?= =?UTF-8?q?onfig=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/Dockerfile | 2 +- server/tsconfig.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 079b457..c8d54b1 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,6 +1,6 @@ FROM node:18-alpine WORKDIR /server -COPY package.json yarn.lock ./ +COPY package.json yarn.lock tsconfig.json ./ RUN yarn install --immutable --immutable-cache --check-cache EXPOSE 8080 RUN yarn build diff --git a/server/tsconfig.json b/server/tsconfig.json index f00b6a2..0870125 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -13,6 +13,5 @@ "resolveJsonModule": true, "isolatedModules": true, "outDir": "./dist", - "rootDir": ".", } } From f6011b191c2cf1df2bca5cba3092a84abb71c110 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:19:49 +0900 Subject: [PATCH 22/51] =?UTF-8?q?fix:=20tsconfig=20include=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80(.)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/tsconfig.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/tsconfig.json b/server/tsconfig.json index 0870125..bbb7a6a 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -13,5 +13,8 @@ "resolveJsonModule": true, "isolatedModules": true, "outDir": "./dist", - } + }, + "include": [ + "." + ], } From 9ed06d98f0f9c3edf1e5e6bf5e681ce0e27cc7db Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:28:13 +0900 Subject: [PATCH 23/51] =?UTF-8?q?chore:=20github=20actions=EC=97=90?= =?UTF-8?q?=EC=84=9C=20build=20=ED=9B=84=20docker=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=8B=A4=ED=96=89=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index c8d54b1..b949de9 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,7 +1,11 @@ FROM node:18-alpine + WORKDIR /server -COPY package.json yarn.lock tsconfig.json ./ -RUN yarn install --immutable --immutable-cache --check-cache -EXPOSE 8080 -RUN yarn build + +COPY package.json /server/package.json +COPY yarn.lock /server/yarn.lock +COPY ./dist /server/dist + +RUN yarn + ENTRYPOINT [ "yarn", "server" ] From 4297c70d5e6c58b7642334338c23c23541f9271e Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:30:45 +0900 Subject: [PATCH 24/51] =?UTF-8?q?chore:=20SERVER=20BUILD=20github=20action?= =?UTF-8?q?s=EC=97=90=EC=84=9C=20server=20build=ED=95=98=EB=8F=84=EB=A1=9D?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/SERVER_BUILD.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index d9b9caf..b096292 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -17,6 +17,13 @@ jobs: uses: actions/setup-node@v1 with: node-version: "18.x" + - name: compile Typescript files + working-directory: './server' + env: + CI: "", + run: | + yarn install --immutable --immutable-cache --check-cache + yan build - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: From fd5d4cdfad037dee1bcfbf5cf9bc20f5bff929a8 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:33:05 +0900 Subject: [PATCH 25/51] =?UTF-8?q?fix:=20comma=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/SERVER_BUILD.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index b096292..1278ba0 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -18,9 +18,9 @@ jobs: with: node-version: "18.x" - name: compile Typescript files - working-directory: './server' + working-directory: "./server" env: - CI: "", + CI: "" run: | yarn install --immutable --immutable-cache --check-cache yan build From 52eea8156b4dabd856c95cb1976eaa5d5cfccbaf Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:34:13 +0900 Subject: [PATCH 26/51] =?UTF-8?q?fix:=20yarn=20=EC=98=A4=ED=83=80=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/SERVER_BUILD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index 1278ba0..f92c084 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -23,7 +23,7 @@ jobs: CI: "" run: | yarn install --immutable --immutable-cache --check-cache - yan build + yarn build - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: From 1bb9a4e2f1c7cb577c98f2084c4101736cf07d59 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 18:39:23 +0900 Subject: [PATCH 27/51] =?UTF-8?q?feat:=20NGINX=20Dockerfile=20=EB=B0=8F=20?= =?UTF-8?q?docker=20compose=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 17 +++++++++++++++++ .github/workflows/SERVER_BUILD.yml | 17 +++++++++++++++++ docker-compose.yml | 17 +++++++++++++++++ nginx/Dockerfile | 4 ++++ nginx/default.conf | 22 ++++++++++++++++++++++ 5 files changed, 77 insertions(+) create mode 100644 docker-compose.yml create mode 100644 nginx/Dockerfile create mode 100644 nginx/default.conf diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index 0aace4e..5f12286 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -34,3 +34,20 @@ jobs: push: true tags: ghcr.io/kumsil1006/oao:oao-client context: ./client + + - name: Run Docker Compose on the Server + uses: appleboy/ssh-action@master + env: + TOKEN: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} + with: + host: ${{ secrets.ANOTHER_HOST }} + username: ${{ secrets.ANOTHER_USERNAME }} + password: ${{ secrets.ANOTHER_PASSWORD }} + port: ${{ secrets.ANOTHER_PORT }} + envs: TOKEN + script: | + docker login https://ghcr.io -u kumsil1006 -p "$TOKEN" + cd project4 + docker pull ghcr.io/kumsil1006/oao:oao-client + docker compose up -d + docker image prune diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index f92c084..feb0366 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -36,3 +36,20 @@ jobs: context: ./server push: true tags: ghcr.io/kumsil1006/oao:oao-server + + - name: Run Docker Compose on the Server + uses: appleboy/ssh-action@master + env: + TOKEN: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} + with: + host: ${{ secrets.ANOTHER_HOST }} + username: ${{ secrets.ANOTHER_USERNAME }} + password: ${{ secrets.ANOTHER_PASSWORD }} + port: ${{ secrets.ANOTHER_PORT }} + envs: TOKEN + script: | + docker login https://ghcr.io -u kumsil1006 -p "$TOKEN" + cd project4 + docker pull ghcr.io/kumsil1006/oao:oao-server + docker compose up -d + docker image prune diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0486d8f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,17 @@ +version: "3.9" +services: + proxy: + image: "ghcr.io/kumsil1006/oao:oao-proxy" + ports: + - "${EXPOSE_PORT}:80" + restart: always + frontend: + image: "ghcr.io/kumsil1006/oao:oao-client" + restart: always + expose: + - "3000" + backend: + image: "ghcr.io/kumsil1006/oao:oao-server" + restart: always + expose: + - "8080" \ No newline at end of file diff --git a/nginx/Dockerfile b/nginx/Dockerfile new file mode 100644 index 0000000..4f2c790 --- /dev/null +++ b/nginx/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx +COPY ./default.conf /etc/nginx/conf.d/default.conf + +RUN apt-get update && apt-get install vim -y diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100644 index 0000000..154c7b9 --- /dev/null +++ b/nginx/default.conf @@ -0,0 +1,22 @@ +server { + listen 80; + location / { + proxy_pass http://frontend:3000; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } + location /api { + rewrite ^/api(.*)$ $1 break; + proxy_pass http://backend:8080; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } +} \ No newline at end of file From 5276f3e96e1d6ed3448dac8d28c992bf9adf9130 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 19:57:05 +0900 Subject: [PATCH 28/51] =?UTF-8?q?README=20=ED=8C=8C=EC=9D=BC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..31a03f1 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# OAO! From edce4c26c365d008f6282d4abea6fc20e8231e7c Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 20:23:51 +0900 Subject: [PATCH 29/51] =?UTF-8?q?fix:=20docker=20login=20=EC=8B=9C=20passw?= =?UTF-8?q?ord=20=EC=9E=85=EB=A0=A5=20=EB=B0=A9=EC=8B=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 6 ++---- .github/workflows/SERVER_BUILD.yml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index 5f12286..8ca4adc 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -37,8 +37,6 @@ jobs: - name: Run Docker Compose on the Server uses: appleboy/ssh-action@master - env: - TOKEN: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} with: host: ${{ secrets.ANOTHER_HOST }} username: ${{ secrets.ANOTHER_USERNAME }} @@ -46,8 +44,8 @@ jobs: port: ${{ secrets.ANOTHER_PORT }} envs: TOKEN script: | - docker login https://ghcr.io -u kumsil1006 -p "$TOKEN" - cd project4 + echo ${{secret.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin + cd client docker pull ghcr.io/kumsil1006/oao:oao-client docker compose up -d docker image prune diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index feb0366..9c27670 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -39,8 +39,6 @@ jobs: - name: Run Docker Compose on the Server uses: appleboy/ssh-action@master - env: - TOKEN: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} with: host: ${{ secrets.ANOTHER_HOST }} username: ${{ secrets.ANOTHER_USERNAME }} @@ -48,8 +46,8 @@ jobs: port: ${{ secrets.ANOTHER_PORT }} envs: TOKEN script: | - docker login https://ghcr.io -u kumsil1006 -p "$TOKEN" - cd project4 + echo ${{secret.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin + cd server docker pull ghcr.io/kumsil1006/oao:oao-server docker compose up -d docker image prune From 4a17888920c91684054491ac8a30a0905cfa8622 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 20:25:02 +0900 Subject: [PATCH 30/51] =?UTF-8?q?fix:=20secret=20=EC=98=A4=ED=83=80=20=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 2 +- .github/workflows/SERVER_BUILD.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index 8ca4adc..bead717 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -44,7 +44,7 @@ jobs: port: ${{ secrets.ANOTHER_PORT }} envs: TOKEN script: | - echo ${{secret.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin + echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin cd client docker pull ghcr.io/kumsil1006/oao:oao-client docker compose up -d diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index 9c27670..321c381 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -46,7 +46,7 @@ jobs: port: ${{ secrets.ANOTHER_PORT }} envs: TOKEN script: | - echo ${{secret.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin + echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin cd server docker pull ghcr.io/kumsil1006/oao:oao-server docker compose up -d From 729c113cae7f847cc2028a64cdb536eb44316bdb Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 20:34:26 +0900 Subject: [PATCH 31/51] =?UTF-8?q?chore:=20docker=20compse=20=EC=8B=9C=20pr?= =?UTF-8?q?oxy=20pull=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 2 +- .github/workflows/SERVER_BUILD.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index bead717..9e25319 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -45,7 +45,7 @@ jobs: envs: TOKEN script: | echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin - cd client docker pull ghcr.io/kumsil1006/oao:oao-client + docker pull ghcr.io/kumsil1006/oao:oao-proxy docker compose up -d docker image prune diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index 321c381..0498341 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -47,7 +47,7 @@ jobs: envs: TOKEN script: | echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin - cd server docker pull ghcr.io/kumsil1006/oao:oao-server + docker pull ghcr.io/kumsil1006/oao:oao-proxy docker compose up -d docker image prune From 2a9a65842c9b18d367397cb8c0850c38c4983b9a Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 21:01:16 +0900 Subject: [PATCH 32/51] =?UTF-8?q?fix:=20docker=20compose=20->=20docker-com?= =?UTF-8?q?pose=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 2 +- .github/workflows/SERVER_BUILD.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index 9e25319..af43890 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -47,5 +47,5 @@ jobs: echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin docker pull ghcr.io/kumsil1006/oao:oao-client docker pull ghcr.io/kumsil1006/oao:oao-proxy - docker compose up -d + docker-compose up -d docker image prune diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index 0498341..e869f99 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -49,5 +49,5 @@ jobs: echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin docker pull ghcr.io/kumsil1006/oao:oao-server docker pull ghcr.io/kumsil1006/oao:oao-proxy - docker compose up -d + docker-compose up -d docker image prune From 20fc74eb482cc6bae87253bcfeea65df5d0df354 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 21:21:34 +0900 Subject: [PATCH 33/51] =?UTF-8?q?feat:=20docker-compose.yml=20remote?= =?UTF-8?q?=EC=97=90=20=EB=B3=B5=EC=82=AC=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 14 +++++++++++++- .github/workflows/SERVER_BUILD.yml | 15 ++++++++++++++- docker-compose.yml | 2 +- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index af43890..feccbc2 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -35,6 +35,16 @@ jobs: tags: ghcr.io/kumsil1006/oao:oao-client context: ./client + - name: Copy Docker Compose into the Server + uses: appleboy/scp-action@master + with: + host: ${{ secrets.ANOTHER_HOST }} + username: ${{ secrets.ANOTHER_USERNAME }} + password: ${{ secrets.ANOTHER_PASSWORD }} + port: ${{ secrets.ANOTHER_PORT }} + source: "docker-compose.yml" + target: "oao" + - name: Run Docker Compose on the Server uses: appleboy/ssh-action@master with: @@ -42,10 +52,12 @@ jobs: username: ${{ secrets.ANOTHER_USERNAME }} password: ${{ secrets.ANOTHER_PASSWORD }} port: ${{ secrets.ANOTHER_PORT }} - envs: TOKEN script: | echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin docker pull ghcr.io/kumsil1006/oao:oao-client docker pull ghcr.io/kumsil1006/oao:oao-proxy + + cd oao + docker-compose up -d docker image prune diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index e869f99..881f08f 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -37,6 +37,16 @@ jobs: push: true tags: ghcr.io/kumsil1006/oao:oao-server + - name: Copy Docker Compose into the Server + uses: appleboy/scp-action@master + with: + host: ${{ secrets.ANOTHER_HOST }} + username: ${{ secrets.ANOTHER_USERNAME }} + password: ${{ secrets.ANOTHER_PASSWORD }} + port: ${{ secrets.ANOTHER_PORT }} + source: "docker-compose.yml" + target: "oao" + - name: Run Docker Compose on the Server uses: appleboy/ssh-action@master with: @@ -44,10 +54,13 @@ jobs: username: ${{ secrets.ANOTHER_USERNAME }} password: ${{ secrets.ANOTHER_PASSWORD }} port: ${{ secrets.ANOTHER_PORT }} - envs: TOKEN + script: | echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin docker pull ghcr.io/kumsil1006/oao:oao-server docker pull ghcr.io/kumsil1006/oao:oao-proxy + + cd oao + docker-compose up -d docker image prune diff --git a/docker-compose.yml b/docker-compose.yml index 0486d8f..4a7bc6a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: proxy: image: "ghcr.io/kumsil1006/oao:oao-proxy" ports: - - "${EXPOSE_PORT}:80" + - "80:80" restart: always frontend: image: "ghcr.io/kumsil1006/oao:oao-client" From 06184c6d1fc794c61bbf5fa5be7de95e48b74257 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 21:23:29 +0900 Subject: [PATCH 34/51] =?UTF-8?q?fix:=20github=20workflow=20=EB=93=A4?= =?UTF-8?q?=EC=97=AC=EC=93=B0=EA=B8=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 20 ++++++++-------- .github/workflows/SERVER_BUILD.yml | 38 +++++++++++++++--------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index feccbc2..7da9690 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -35,15 +35,15 @@ jobs: tags: ghcr.io/kumsil1006/oao:oao-client context: ./client - - name: Copy Docker Compose into the Server - uses: appleboy/scp-action@master - with: - host: ${{ secrets.ANOTHER_HOST }} - username: ${{ secrets.ANOTHER_USERNAME }} - password: ${{ secrets.ANOTHER_PASSWORD }} - port: ${{ secrets.ANOTHER_PORT }} - source: "docker-compose.yml" - target: "oao" + - name: Copy Docker Compose into the Server + uses: appleboy/scp-action@master + with: + host: ${{ secrets.ANOTHER_HOST }} + username: ${{ secrets.ANOTHER_USERNAME }} + password: ${{ secrets.ANOTHER_PASSWORD }} + port: ${{ secrets.ANOTHER_PORT }} + source: "docker-compose.yml" + target: "oao" - name: Run Docker Compose on the Server uses: appleboy/ssh-action@master @@ -58,6 +58,6 @@ jobs: docker pull ghcr.io/kumsil1006/oao:oao-proxy cd oao - + docker-compose up -d docker image prune diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index 881f08f..a075793 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -37,30 +37,30 @@ jobs: push: true tags: ghcr.io/kumsil1006/oao:oao-server - - name: Copy Docker Compose into the Server - uses: appleboy/scp-action@master - with: - host: ${{ secrets.ANOTHER_HOST }} - username: ${{ secrets.ANOTHER_USERNAME }} - password: ${{ secrets.ANOTHER_PASSWORD }} - port: ${{ secrets.ANOTHER_PORT }} - source: "docker-compose.yml" - target: "oao" - - - name: Run Docker Compose on the Server - uses: appleboy/ssh-action@master + - name: Copy Docker Compose into the Server + uses: appleboy/scp-action@master with: host: ${{ secrets.ANOTHER_HOST }} username: ${{ secrets.ANOTHER_USERNAME }} password: ${{ secrets.ANOTHER_PASSWORD }} port: ${{ secrets.ANOTHER_PORT }} + source: "docker-compose.yml" + target: "oao" + + - name: Run Docker Compose on the Server + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.ANOTHER_HOST }} + username: ${{ secrets.ANOTHER_USERNAME }} + password: ${{ secrets.ANOTHER_PASSWORD }} + port: ${{ secrets.ANOTHER_PORT }} - script: | - echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin - docker pull ghcr.io/kumsil1006/oao:oao-server - docker pull ghcr.io/kumsil1006/oao:oao-proxy + script: | + echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin + docker pull ghcr.io/kumsil1006/oao:oao-server + docker pull ghcr.io/kumsil1006/oao:oao-proxy - cd oao + cd oao - docker-compose up -d - docker image prune + docker-compose up -d + docker image prune From 53e2af5edba30f127f939be9b4586ca398bd84c4 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 21:25:43 +0900 Subject: [PATCH 35/51] =?UTF-8?q?fix:=20server=20build=20yml=20=EB=93=A4?= =?UTF-8?q?=EC=97=AC=EC=93=B0=EA=B8=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/SERVER_BUILD.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index a075793..dd7e7f8 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -47,20 +47,19 @@ jobs: source: "docker-compose.yml" target: "oao" - - name: Run Docker Compose on the Server - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.ANOTHER_HOST }} - username: ${{ secrets.ANOTHER_USERNAME }} - password: ${{ secrets.ANOTHER_PASSWORD }} - port: ${{ secrets.ANOTHER_PORT }} - - script: | - echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin - docker pull ghcr.io/kumsil1006/oao:oao-server - docker pull ghcr.io/kumsil1006/oao:oao-proxy + - name: Run Docker Compose on the Server + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.ANOTHER_HOST }} + username: ${{ secrets.ANOTHER_USERNAME }} + password: ${{ secrets.ANOTHER_PASSWORD }} + port: ${{ secrets.ANOTHER_PORT }} + script: | + echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin + docker pull ghcr.io/kumsil1006/oao:oao-server + docker pull ghcr.io/kumsil1006/oao:oao-proxy - cd oao + cd oao - docker-compose up -d - docker image prune + docker-compose up -d + docker image prune From c78040772e76fbfbaab21d6eb483a6f95a04d127 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 21:45:46 +0900 Subject: [PATCH 36/51] =?UTF-8?q?fix:=20backend=20express=20server=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/index.ts b/server/index.ts index f3bccb9..f986838 100644 --- a/server/index.ts +++ b/server/index.ts @@ -6,6 +6,14 @@ app.get("/", (req: Request, res: Response) => { res.send("hi"); }); +app.get("/api/test", (req: Request, res: Response) => { + res.send("hi api test"); +}); + +app.get("/api", (req: Request, res: Response) => { + res.send("hi api"); +}); + app.listen(8080, () => { console.log("server is running"); }); From 4f1f07815cd7cdbc240778d988ca38357dd13557 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Tue, 22 Nov 2022 22:33:04 +0900 Subject: [PATCH 37/51] =?UTF-8?q?chore:=20ci&cd=20event=20pull=5Frequest?= =?UTF-8?q?=20->=20push=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 2 +- .github/workflows/SERVER_BUILD.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index 7da9690..eda9eb3 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -1,6 +1,6 @@ name: client build on: - pull_request: + push: branches: - main - release diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index dd7e7f8..d2a8d0d 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -1,6 +1,6 @@ name: server build on: - pull_request: + push: branches: - main - release From 2c8bb3b2ed0b480be9e310e694e22db7f59f2778 Mon Sep 17 00:00:00 2001 From: NaGyeong Park Date: Wed, 23 Nov 2022 02:16:23 +0900 Subject: [PATCH 38/51] =?UTF-8?q?fix:=20github=20action=20name=20conventio?= =?UTF-8?q?n=20=ED=86=B5=EC=9D=BC=20&=20client=20node=20modu=20les=20?= =?UTF-8?q?=ED=8F=B4=EB=8D=94=20=EC=BA=90=EC=8B=B1=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 27 ++++++++++++++++++++------- .github/workflows/SERVER_BUILD.yml | 8 ++++++-- .github/workflows/TEST_COVERAGE.yml | 2 +- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index eda9eb3..c7b2385 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -1,6 +1,6 @@ name: client build on: - push: + pull_request: branches: - main - release @@ -9,25 +9,38 @@ on: jobs: build-image: - name: client image + name: Client image build & Compose & Run on Server runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Setup Node uses: actions/setup-node@v1 with: node-version: "18.x" - - name: Install & Test - run: | - cd client - yarn - yarn build + + - name: Cache node modules + uses: actions/cache@v2 + id: cache + with: + path: "**/client/node_modules" + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + + - name: Install dependencies + working-directory: "./server" + if: steps.cache.outputs.cache-hit != 'true' + run: yarn + + - name: Client build + run: yarn build + - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: registry: ghcr.io username: kumsil1006 password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + - name: Build and push Docker images uses: docker/build-push-action@v3.2.0 with: diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index d2a8d0d..15ede86 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -9,27 +9,31 @@ on: jobs: build-image: - name: server image build + name: Server image build & Compose & Run on Server runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Setup Node uses: actions/setup-node@v1 with: node-version: "18.x" - - name: compile Typescript files + + - name: Compile Typescript files working-directory: "./server" env: CI: "" run: | yarn install --immutable --immutable-cache --check-cache yarn build + - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: registry: ghcr.io username: kumsil1006 password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + - name: Build and push Docker images uses: docker/build-push-action@v3.2.0 with: diff --git a/.github/workflows/TEST_COVERAGE.yml b/.github/workflows/TEST_COVERAGE.yml index 680385c..936b9df 100644 --- a/.github/workflows/TEST_COVERAGE.yml +++ b/.github/workflows/TEST_COVERAGE.yml @@ -8,7 +8,7 @@ on: - "client/**" jobs: - build: + Code-coverage: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 05ed216f55fa9cf9565629de9131f3e674000f5c Mon Sep 17 00:00:00 2001 From: NaGyeong Park Date: Wed, 23 Nov 2022 02:19:20 +0900 Subject: [PATCH 39/51] =?UTF-8?q?fix:=20client=20build=20working=20directo?= =?UTF-8?q?ry=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index c7b2385..0582f65 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -27,11 +27,12 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Install dependencies - working-directory: "./server" + working-directory: "./client" if: steps.cache.outputs.cache-hit != 'true' run: yarn - name: Client build + working-directory: "./client" run: yarn build - name: Login to GitHub Container Registry From 040e99e2daf599e1af03afd01e28443279be8960 Mon Sep 17 00:00:00 2001 From: NaGyeong Park Date: Wed, 23 Nov 2022 02:22:37 +0900 Subject: [PATCH 40/51] =?UTF-8?q?fix:=20github=20action=20client=20cache?= =?UTF-8?q?=20working=20directory=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index 0582f65..fa2e3d7 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -21,9 +21,10 @@ jobs: - name: Cache node modules uses: actions/cache@v2 + working-directory: "./client" id: cache with: - path: "**/client/node_modules" + path: "**/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Install dependencies From c2b521c8e5a759f4d752fed4e71fec958d725b72 Mon Sep 17 00:00:00 2001 From: NaGyeong Park Date: Wed, 23 Nov 2022 02:23:45 +0900 Subject: [PATCH 41/51] =?UTF-8?q?fix:=20github=20action=20client=20cache?= =?UTF-8?q?=20=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index fa2e3d7..2e6e38d 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -21,11 +21,10 @@ jobs: - name: Cache node modules uses: actions/cache@v2 - working-directory: "./client" id: cache with: - path: "**/node_modules" - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + path: "**/client/node_modules" + key: ${{ runner.os }}-modules-${{ hashFiles('**/client/yarn.lock') }} - name: Install dependencies working-directory: "./client" From 874e0bdb158e14d4a8a9189ec8589a358688de7b Mon Sep 17 00:00:00 2001 From: NaGyeong Park Date: Wed, 23 Nov 2022 02:39:38 +0900 Subject: [PATCH 42/51] =?UTF-8?q?chore:=20action=20=EC=8B=A4=ED=96=89?= =?UTF-8?q?=EC=8B=9C=20slack=EC=97=90=20=EC=95=8C=EB=A6=BC=20=EC=A0=84?= =?UTF-8?q?=EC=86=A1=20action=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/slack-notify/action.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/actions/slack-notify/action.yml diff --git a/.github/actions/slack-notify/action.yml b/.github/actions/slack-notify/action.yml new file mode 100644 index 0000000..afaf215 --- /dev/null +++ b/.github/actions/slack-notify/action.yml @@ -0,0 +1,23 @@ +name: "slack-notify" + +inputs: + status: + required: false + default: "failure" + slack_incoming_url: + required: true + +runs: + using: "composite" + + steps: + - name: Send slack + shell: bash + run: | + if [ "${{ inputs.status }}" = "success" ]; then + EMOTICON="✅" + else + EMOTICON="⛔" + fi + MSG="{ \"text\":\">${EMOTICON} workflow () in \n> job ${{ inputs.status }}, branch=\`${GITHUB_REF#refs/heads/}\`\"}" + curl -X POST -H 'Content-type: application/json' --data "${MSG}" "${{ inputs.slack_incoming_url }}" From 8eff3b9ef8b756c1b52aa504ddb10d3b083e5043 Mon Sep 17 00:00:00 2001 From: NaGyeong Park Date: Wed, 23 Nov 2022 02:43:07 +0900 Subject: [PATCH 43/51] =?UTF-8?q?chore:=20workflow=EB=93=A4=EC=97=90=20sla?= =?UTF-8?q?ck-notify=20action=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 15 ++++++++++++++- .github/workflows/SERVER_BUILD.yml | 13 +++++++++++++ .github/workflows/TEST_COVERAGE.yml | 16 ++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index 2e6e38d..841731c 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -1,6 +1,6 @@ name: client build on: - pull_request: + push: branches: - main - release @@ -75,3 +75,16 @@ jobs: docker-compose up -d docker image prune + + - name: Send slack when failed + if: ${{ failure() }} + uses: ./.github/actions/slack-notify + with: + slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} + + - name: Send slack if completed + if: ${{ success() }} + uses: ./.github/actions/slack-notify + with: + status: success + slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index 15ede86..413db31 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -67,3 +67,16 @@ jobs: docker-compose up -d docker image prune + + - name: Send slack when failed + if: ${{ failure() }} + uses: ./.github/actions/slack-notify + with: + slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} + + - name: Send slack if completed + if: ${{ success() }} + uses: ./.github/actions/slack-notify + with: + status: success + slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} diff --git a/.github/workflows/TEST_COVERAGE.yml b/.github/workflows/TEST_COVERAGE.yml index 936b9df..85e9f50 100644 --- a/.github/workflows/TEST_COVERAGE.yml +++ b/.github/workflows/TEST_COVERAGE.yml @@ -12,16 +12,32 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Setup Node uses: actions/setup-node@v1 with: node-version: "18.x" + - name: Install & Test run: | cd client yarn yarn test + - name: Code Coverage uses: codecov/codecov-action@v3 with: flags: unittests # optional + + - name: Send slack when failed + if: ${{ failure() }} + uses: ./.github/actions/slack-notify + with: + slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} + + - name: Send slack if completed + if: ${{ success() }} + uses: ./.github/actions/slack-notify + with: + status: success + slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} From fafe96781f21ffea8ea8597e53a2f8fa861dc6ac Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Wed, 23 Nov 2022 13:48:07 +0900 Subject: [PATCH 44/51] =?UTF-8?q?feat:=20dev,=20release=20action=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 7 +- .github/workflows/CLIENT_DEV_BUILD.yml | 89 ++++++++++++++++++++++++++ .github/workflows/SERVER_BUILD.yml | 7 +- .github/workflows/SERVER_DEV_BUILD.yml | 81 +++++++++++++++++++++++ 4 files changed, 176 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/CLIENT_DEV_BUILD.yml create mode 100644 .github/workflows/SERVER_DEV_BUILD.yml diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index 841731c..0c86b44 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -2,7 +2,6 @@ name: client build on: push: branches: - - main - release paths: - "client/**" @@ -46,7 +45,7 @@ jobs: uses: docker/build-push-action@v3.2.0 with: push: true - tags: ghcr.io/kumsil1006/oao:oao-client + tags: ghcr.io/kumsil1006/oao-client context: ./client - name: Copy Docker Compose into the Server @@ -68,8 +67,8 @@ jobs: port: ${{ secrets.ANOTHER_PORT }} script: | echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin - docker pull ghcr.io/kumsil1006/oao:oao-client - docker pull ghcr.io/kumsil1006/oao:oao-proxy + docker pull ghcr.io/kumsil1006/oao-client + docker pull ghcr.io/kumsil1006/oao-proxy cd oao diff --git a/.github/workflows/CLIENT_DEV_BUILD.yml b/.github/workflows/CLIENT_DEV_BUILD.yml new file mode 100644 index 0000000..8cfa062 --- /dev/null +++ b/.github/workflows/CLIENT_DEV_BUILD.yml @@ -0,0 +1,89 @@ +name: client build +on: + push: + branches: + - main + paths: + - "client/**" + +jobs: + build-image: + name: Client image build & Compose & Run on Server + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: "18.x" + + - name: Cache node modules + uses: actions/cache@v2 + id: cache + with: + path: "**/client/node_modules" + key: ${{ runner.os }}-modules-${{ hashFiles('**/client/yarn.lock') }} + + - name: Install dependencies + working-directory: "./client" + if: steps.cache.outputs.cache-hit != 'true' + run: yarn + + - name: Client build + working-directory: "./client" + run: yarn build + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: kumsil1006 + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + + - name: Build and push Docker images + uses: docker/build-push-action@v3.2.0 + with: + push: true + tags: ghcr.io/kumsil1006/oao-dev-client + context: ./client + + - name: Copy Docker Compose into the Server + uses: appleboy/scp-action@master + with: + host: ${{ secrets.ANOTHER_HOST }} + username: ${{ secrets.ANOTHER_USERNAME }} + password: ${{ secrets.ANOTHER_PASSWORD }} + port: ${{ secrets.ANOTHER_PORT }} + source: "docker-compose.yml" + target: "oao" + + - name: Run Docker Compose on the Server + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.ANOTHER_HOST }} + username: ${{ secrets.ANOTHER_USERNAME }} + password: ${{ secrets.ANOTHER_PASSWORD }} + port: ${{ secrets.ANOTHER_PORT }} + script: | + echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin + docker pull ghcr.io/kumsil1006/oao-dev-client + docker pull ghcr.io/kumsil1006/oao-dev-proxy + + cd oao + + docker-compose up -d + docker image prune + + - name: Send slack when failed + if: ${{ failure() }} + uses: ./.github/actions/slack-notify + with: + slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} + + - name: Send slack if completed + if: ${{ success() }} + uses: ./.github/actions/slack-notify + with: + status: success + slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index 413db31..ff2cd06 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -2,7 +2,6 @@ name: server build on: push: branches: - - main - release paths: - "server/**" @@ -39,7 +38,7 @@ jobs: with: context: ./server push: true - tags: ghcr.io/kumsil1006/oao:oao-server + tags: ghcr.io/kumsil1006/oao-server - name: Copy Docker Compose into the Server uses: appleboy/scp-action@master @@ -60,8 +59,8 @@ jobs: port: ${{ secrets.ANOTHER_PORT }} script: | echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin - docker pull ghcr.io/kumsil1006/oao:oao-server - docker pull ghcr.io/kumsil1006/oao:oao-proxy + docker pull ghcr.io/kumsil1006/oao-server + docker pull ghcr.io/kumsil1006/oao-proxy cd oao diff --git a/.github/workflows/SERVER_DEV_BUILD.yml b/.github/workflows/SERVER_DEV_BUILD.yml new file mode 100644 index 0000000..a662220 --- /dev/null +++ b/.github/workflows/SERVER_DEV_BUILD.yml @@ -0,0 +1,81 @@ +name: server build +on: + push: + branches: + - main + paths: + - "server/**" + +jobs: + build-image: + name: Server image build & Compose & Run on Server + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: "18.x" + + - name: Compile Typescript files + working-directory: "./server" + env: + CI: "" + run: | + yarn install --immutable --immutable-cache --check-cache + yarn build + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: kumsil1006 + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + + - name: Build and push Docker images + uses: docker/build-push-action@v3.2.0 + with: + context: ./server + push: true + tags: ghcr.io/kumsil1006/oao-dev-server + + - name: Copy Docker Compose into the Server + uses: appleboy/scp-action@master + with: + host: ${{ secrets.ANOTHER_HOST }} + username: ${{ secrets.ANOTHER_USERNAME }} + password: ${{ secrets.ANOTHER_PASSWORD }} + port: ${{ secrets.ANOTHER_PORT }} + source: "docker-compose.yml" + target: "oao" + + - name: Run Docker Compose on the Server + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.ANOTHER_HOST }} + username: ${{ secrets.ANOTHER_USERNAME }} + password: ${{ secrets.ANOTHER_PASSWORD }} + port: ${{ secrets.ANOTHER_PORT }} + script: | + echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin + docker pull ghcr.io/kumsil1006/oao-dev-server + docker pull ghcr.io/kumsil1006/oao-dev-proxy + + cd oao + + docker-compose up -d + docker image prune + + - name: Send slack when failed + if: ${{ failure() }} + uses: ./.github/actions/slack-notify + with: + slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} + + - name: Send slack if completed + if: ${{ success() }} + uses: ./.github/actions/slack-notify + with: + status: success + slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} From d508fec39eeff9f8f586751b3d473201824094c8 Mon Sep 17 00:00:00 2001 From: NaGyeong Park <97649363+NaGyeong-Park@users.noreply.github.com> Date: Wed, 23 Nov 2022 14:01:02 +0900 Subject: [PATCH 45/51] =?UTF-8?q?fix:=20CLIENT=5FBUILD=20job=20description?= =?UTF-8?q?=20=ED=95=9C=EA=B5=AD=EC=96=B4=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index 0c86b44..a36d5bf 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -1,4 +1,4 @@ -name: client build +name: release-client CI/CD on: push: branches: @@ -8,47 +8,47 @@ on: jobs: build-image: - name: Client image build & Compose & Run on Server + name: release-client CI/CD runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Setup Node + - name: Node 설정 uses: actions/setup-node@v1 with: node-version: "18.x" - - name: Cache node modules + - name: node_modules 폴더 캐싱 uses: actions/cache@v2 id: cache with: path: "**/client/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/client/yarn.lock') }} - - name: Install dependencies + - name: node_modules 폴더 캐시가 없다면 dependencies 설치 working-directory: "./client" if: steps.cache.outputs.cache-hit != 'true' run: yarn - - name: Client build + - name: Client 소스 빌드 working-directory: "./client" run: yarn build - - name: Login to GitHub Container Registry + - name: GitHub Container Registry 로그인 uses: docker/login-action@v1 with: registry: ghcr.io username: kumsil1006 password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - - name: Build and push Docker images + - name: Docker images build 및 GitHub Container Registry로 push uses: docker/build-push-action@v3.2.0 with: push: true tags: ghcr.io/kumsil1006/oao-client context: ./client - - name: Copy Docker Compose into the Server + - name: Docker Compose 파일 운영 서버로 복사 uses: appleboy/scp-action@master with: host: ${{ secrets.ANOTHER_HOST }} @@ -58,7 +58,7 @@ jobs: source: "docker-compose.yml" target: "oao" - - name: Run Docker Compose on the Server + - name: 운영 서버에서 Docker Compose 실행 uses: appleboy/ssh-action@master with: host: ${{ secrets.ANOTHER_HOST }} @@ -75,13 +75,13 @@ jobs: docker-compose up -d docker image prune - - name: Send slack when failed + - name: 실패시 슬랙 메시지 전송 if: ${{ failure() }} uses: ./.github/actions/slack-notify with: slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} - - name: Send slack if completed + - name: 성공시 슬랙 메시지 전송 if: ${{ success() }} uses: ./.github/actions/slack-notify with: From b6ad61d45ce18af3f5177ec8ad3457d51b7a8d0e Mon Sep 17 00:00:00 2001 From: NaGyeong Park <97649363+NaGyeong-Park@users.noreply.github.com> Date: Wed, 23 Nov 2022 14:06:04 +0900 Subject: [PATCH 46/51] =?UTF-8?q?fix:=20CLIENT=5FDEV=5FBUILD=20job=20descr?= =?UTF-8?q?iption=20=ED=95=9C=EA=B5=AD=EC=96=B4=EB=A1=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_DEV_BUILD.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CLIENT_DEV_BUILD.yml b/.github/workflows/CLIENT_DEV_BUILD.yml index 8cfa062..fcb2199 100644 --- a/.github/workflows/CLIENT_DEV_BUILD.yml +++ b/.github/workflows/CLIENT_DEV_BUILD.yml @@ -1,4 +1,4 @@ -name: client build +name: dev-client CI/CD on: push: branches: @@ -8,47 +8,47 @@ on: jobs: build-image: - name: Client image build & Compose & Run on Server + name: dev-client CI/CD runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Setup Node + - name: Node 설정 uses: actions/setup-node@v1 with: node-version: "18.x" - - name: Cache node modules + - name: node_modules 폴더 캐싱 uses: actions/cache@v2 id: cache with: path: "**/client/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/client/yarn.lock') }} - - name: Install dependencies + - name: node_modules 폴더 캐시가 없다면 dependencies 설치 working-directory: "./client" if: steps.cache.outputs.cache-hit != 'true' run: yarn - - name: Client build + - name: Client 소스 build working-directory: "./client" run: yarn build - - name: Login to GitHub Container Registry + - name: GitHub Container Registry 로그인 uses: docker/login-action@v1 with: registry: ghcr.io username: kumsil1006 password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - - name: Build and push Docker images + - name: Docker images build 및 GitHub Container Registry로 push uses: docker/build-push-action@v3.2.0 with: push: true tags: ghcr.io/kumsil1006/oao-dev-client context: ./client - - name: Copy Docker Compose into the Server + - name: Docker Compose 파일 운영 서버로 복사 uses: appleboy/scp-action@master with: host: ${{ secrets.ANOTHER_HOST }} @@ -58,7 +58,7 @@ jobs: source: "docker-compose.yml" target: "oao" - - name: Run Docker Compose on the Server + - name: 운영 서버에서 Docker Compose 실행 uses: appleboy/ssh-action@master with: host: ${{ secrets.ANOTHER_HOST }} @@ -75,13 +75,13 @@ jobs: docker-compose up -d docker image prune - - name: Send slack when failed + - name: 실패시 슬랙 메시지 전송 if: ${{ failure() }} uses: ./.github/actions/slack-notify with: slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} - - name: Send slack if completed + - name: 성공시 슬랙 메시지 전송 if: ${{ success() }} uses: ./.github/actions/slack-notify with: From 6f05a9289d2beca0a1ef482f465491286a5b86d6 Mon Sep 17 00:00:00 2001 From: NaGyeong Park <97649363+NaGyeong-Park@users.noreply.github.com> Date: Wed, 23 Nov 2022 14:08:31 +0900 Subject: [PATCH 47/51] =?UTF-8?q?fix:=20SERVER=5FBUILD=20job=20description?= =?UTF-8?q?=20=ED=95=9C=EA=B5=AD=EC=96=B4=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/SERVER_BUILD.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index ff2cd06..336a646 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -1,4 +1,4 @@ -name: server build +name: release-server CI/CD on: push: branches: @@ -8,17 +8,17 @@ on: jobs: build-image: - name: Server image build & Compose & Run on Server + name: release-server CI/CD runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Setup Node + - name: Node 설정 uses: actions/setup-node@v1 with: node-version: "18.x" - - name: Compile Typescript files + - name: Typescript 파일들 compile working-directory: "./server" env: CI: "" @@ -26,21 +26,21 @@ jobs: yarn install --immutable --immutable-cache --check-cache yarn build - - name: Login to GitHub Container Registry + - name: GitHub Container Registry 로그인 uses: docker/login-action@v1 with: registry: ghcr.io username: kumsil1006 password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - - name: Build and push Docker images + - name: Docker images build 및 GitHub Container Registry로 push uses: docker/build-push-action@v3.2.0 with: context: ./server push: true tags: ghcr.io/kumsil1006/oao-server - - name: Copy Docker Compose into the Server + - name: Docker Compose 파일 운영 서버로 복사 uses: appleboy/scp-action@master with: host: ${{ secrets.ANOTHER_HOST }} @@ -50,7 +50,7 @@ jobs: source: "docker-compose.yml" target: "oao" - - name: Run Docker Compose on the Server + - name: 운영 서버에서 Docker Compose 실행 uses: appleboy/ssh-action@master with: host: ${{ secrets.ANOTHER_HOST }} @@ -67,13 +67,13 @@ jobs: docker-compose up -d docker image prune - - name: Send slack when failed + - name: 실패시 슬랙 메시지 전송 if: ${{ failure() }} uses: ./.github/actions/slack-notify with: slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} - - name: Send slack if completed + - name: 성공시 슬랙 메시지 전송 if: ${{ success() }} uses: ./.github/actions/slack-notify with: From 4e76ef12f5f3eeaed9167e665f7d2078a56391e6 Mon Sep 17 00:00:00 2001 From: NaGyeong Park <97649363+NaGyeong-Park@users.noreply.github.com> Date: Wed, 23 Nov 2022 14:10:43 +0900 Subject: [PATCH 48/51] =?UTF-8?q?fix:=20SERVER=5FDEV=5FBUILD=20job=20descr?= =?UTF-8?q?iption=20=ED=95=9C=EA=B5=AD=EC=96=B4=EB=A1=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/SERVER_DEV_BUILD.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/SERVER_DEV_BUILD.yml b/.github/workflows/SERVER_DEV_BUILD.yml index a662220..4520002 100644 --- a/.github/workflows/SERVER_DEV_BUILD.yml +++ b/.github/workflows/SERVER_DEV_BUILD.yml @@ -1,4 +1,4 @@ -name: server build +name: dev-server CI/CD on: push: branches: @@ -8,17 +8,17 @@ on: jobs: build-image: - name: Server image build & Compose & Run on Server + name: dev-server CI/CD runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Setup Node + - name: Node 설정 uses: actions/setup-node@v1 with: node-version: "18.x" - - name: Compile Typescript files + - name: Typescript 파일들 compile working-directory: "./server" env: CI: "" @@ -26,21 +26,21 @@ jobs: yarn install --immutable --immutable-cache --check-cache yarn build - - name: Login to GitHub Container Registry + - name: GitHub Container Registry 로그인 uses: docker/login-action@v1 with: registry: ghcr.io username: kumsil1006 password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - - name: Build and push Docker images + - name: Docker images build 및 GitHub Container Registry로 push uses: docker/build-push-action@v3.2.0 with: context: ./server push: true tags: ghcr.io/kumsil1006/oao-dev-server - - name: Copy Docker Compose into the Server + - name: Docker Compose 파일 운영 서버로 복사 uses: appleboy/scp-action@master with: host: ${{ secrets.ANOTHER_HOST }} @@ -50,7 +50,7 @@ jobs: source: "docker-compose.yml" target: "oao" - - name: Run Docker Compose on the Server + - name: 운영 서버에서 Docker Compose 실행 uses: appleboy/ssh-action@master with: host: ${{ secrets.ANOTHER_HOST }} @@ -67,13 +67,13 @@ jobs: docker-compose up -d docker image prune - - name: Send slack when failed + - name: 실패시 슬랙 메시지 전송 if: ${{ failure() }} uses: ./.github/actions/slack-notify with: slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} - - name: Send slack if completed + - name: 성공시 슬랙 메시지 전송 if: ${{ success() }} uses: ./.github/actions/slack-notify with: From 312a0fc8ab174beff9237ae841fbe9198d8d3d23 Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Wed, 23 Nov 2022 14:31:51 +0900 Subject: [PATCH 49/51] =?UTF-8?q?feat:=20Docker=20image=20tag=20versioning?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80,=20github=20application=20version=20up=20?= =?UTF-8?q?=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CLIENT_BUILD.yml | 10 ++++++++-- .github/workflows/PRODUCTION_RELEASE.yml | 18 ++++++++++++++++++ .github/workflows/SERVER_BUILD.yml | 8 +++++++- 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/PRODUCTION_RELEASE.yml diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index a36d5bf..03b969d 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -2,7 +2,7 @@ name: release-client CI/CD on: push: branches: - - release + - 42-env-docker-및-remote-server-설정 paths: - "client/**" @@ -41,11 +41,17 @@ jobs: username: kumsil1006 password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + - name: Github Release 최신 tag 받아오기 + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Docker images build 및 GitHub Container Registry로 push uses: docker/build-push-action@v3.2.0 with: push: true - tags: ghcr.io/kumsil1006/oao-client + tags: ghcr.io/kumsil1006/oao-client:${{ steps.tag_version.outputs.previous_tag }},ghcr.io/kumsil1006/oao-client:latest context: ./client - name: Docker Compose 파일 운영 서버로 복사 diff --git a/.github/workflows/PRODUCTION_RELEASE.yml b/.github/workflows/PRODUCTION_RELEASE.yml new file mode 100644 index 0000000..388b5cd --- /dev/null +++ b/.github/workflows/PRODUCTION_RELEASE.yml @@ -0,0 +1,18 @@ +name: Release Github Application Version +on: + pull_reaquest: + branches: + - main + + - name: Github Release 최신 tag 받아오기 + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: GitHub project release 업데이트 + uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.tag_version.outputs.new_tag }} + name: Release ${{ steps.tag_version.outputs.new_tag }} + body: ${{ steps.tag_version.outputs.changelog }} diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index ff2cd06..bb06ace 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -33,12 +33,18 @@ jobs: username: kumsil1006 password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + - name: Github Release 최신 tag 받아오기 + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push Docker images uses: docker/build-push-action@v3.2.0 with: context: ./server push: true - tags: ghcr.io/kumsil1006/oao-server + tags: ghcr.io/kumsil1006/oao-server:${{ steps.tag_version.outputs.previous_tag }},ghcr.io/kumsil1006/oao-server:latest - name: Copy Docker Compose into the Server uses: appleboy/scp-action@master From 55afce63484841e4c9b90c522f1f9c7303f78a6f Mon Sep 17 00:00:00 2001 From: Soobeen Yoon <39304306+kumsil1006@users.noreply.github.com> Date: Wed, 23 Nov 2022 14:36:39 +0900 Subject: [PATCH 50/51] Update PRODUCTION_RELEASE.yml --- .github/workflows/PRODUCTION_RELEASE.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/PRODUCTION_RELEASE.yml b/.github/workflows/PRODUCTION_RELEASE.yml index 388b5cd..9b6a713 100644 --- a/.github/workflows/PRODUCTION_RELEASE.yml +++ b/.github/workflows/PRODUCTION_RELEASE.yml @@ -1,9 +1,13 @@ name: Release Github Application Version on: - pull_reaquest: + pull_request: branches: - main +jobs: + release-application: + runs-on: ubuntu-latest + steps: - name: Github Release 최신 tag 받아오기 id: tag_version uses: mathieudutour/github-tag-action@v6.1 From 4f065c365440afd8776f98b0906cfe6e310289ff Mon Sep 17 00:00:00 2001 From: kumsil1006 <39304306+kumsil1006@users.noreply.github.com> Date: Wed, 23 Nov 2022 14:45:29 +0900 Subject: [PATCH 51/51] =?UTF-8?q?chore:=20test=EC=9A=A9=20client=20commit?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index 86f866b..832b6c5 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,5 +1,5 @@ function App() { - return
Hello World!
; + return
Hello Docker!
; } export default App;