Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/#145 #161

Merged
merged 38 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d2fc31f
[FEAT] CI yml ์ž‘์„ฑ
Apr 10, 2024
1d66b71
[CHORE] Docker Compose ํŒŒ์ผ Deprecated ์ฒ˜๋ฆฌ
Apr 10, 2024
b8286e8
[FIX] ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์˜ค๋ฅ˜ ์ˆ˜์ •
mikekks Apr 10, 2024
a2552d9
Merge branch 'develop' of https://github.com/sopt-makers/sopt-crew-baโ€ฆ
Apr 10, 2024
e42bd95
Merge branch 'develop' of https://github.com/sopt-makers/sopt-crew-baโ€ฆ
Apr 10, 2024
9771fea
[FIX] Build ๋ช…๋ น์–ด ์ˆ˜์ •
Apr 10, 2024
57e7fc0
[FIX] Build ๋ช…๋ น์–ด ์ˆ˜์ •
Apr 10, 2024
85dbfd0
[FEAT] secret ๊ฐ’ ๋ฐ›์•„์™€์„œ ํŒŒ์ผ ๋งŒ๋“œ๋Š” ๋กœ์ง ์ถ”๊ฐ€
Apr 10, 2024
8b33123
[CHORE] ํ˜„์žฌ ๊ฒฝ๋กœ ์ถœ๋ ฅํ•˜๋Š” ์ฝ”๋“œ ์ถ”๊ฐ€
Apr 10, 2024
16fbf45
[CHORE] NestJS ์„œ๋ฒ„ CI ๊ณผ์ •์—์„œ ์ œ์™ธ
Apr 10, 2024
5e79e03
[FEAT] ์—ฌ๋Ÿฌ ๋„์ปค ์ด๋ฏธ์ง€๋ฅผ ๋ฐฐํฌํ•˜๊ธฐ ์œ„ํ•œ ํŒŒ์ผ ์ž‘์„ฑ
Apr 11, 2024
5ce84cd
[FEAT] CD ์Šคํฌ๋ฆฝํŠธ ์ž‘์„ฑ
Apr 13, 2024
b3226eb
[FIX] Docker Compose ํŒŒ์ผ Deprecated ์‚ญ์ œ
Apr 21, 2024
b849d39
[CHORE] .gitignore์— deploy.sh ์ถ”๊ฐ€
Apr 21, 2024
6d0b94c
[FEAT] Docker Compose ํŒŒ์ผ ์ˆ˜์ •
Apr 21, 2024
7f02a1b
[FEAT] cd.yml ์ˆ˜์ •
Apr 21, 2024
e5403dd
[CHORE] cd ์ด๋ฆ„ ์ˆ˜์ •
Apr 21, 2024
a01ae61
Merge branch 'develop' of https://github.com/sopt-makers/sopt-crew-baโ€ฆ
Apr 21, 2024
41f3ea9
Merge branch 'develop' of https://github.com/sopt-makers/sopt-crew-baโ€ฆ
Apr 21, 2024
c09e86d
[FEAT] dev, prod ๋ณ„ cd.yml ๋ถ„๋ฆฌ
Apr 21, 2024
7144430
[CHORE] docker compose์—์„œ env ํŒŒ์ผ ๊ฒฝ๋กœ ์ˆ˜์ •
Apr 21, 2024
fd845ee
[CHORE] swagger.env ํŒŒ์ผ ๊ฒฝ๋กœ ๋ณ€๊ฒฝ
Apr 21, 2024
226a27c
[CHORE] .swagger.env ํŒŒ์ผ ์‚ฌ์šฉ ์•ˆํ•˜๋„๋ก ์ฃผ์„ ์ฒ˜๋ฆฌ
Apr 21, 2024
6912e0f
[CHORE] image ํƒœ๊ทธ ์ถ”๊ฐ€
Apr 21, 2024
c7849a9
[CHORE] docker compose ํŒŒ์ผ ์ˆ˜์ •
Apr 21, 2024
8285124
[CHORE] ์ฃผ์„ ์ œ๊ฑฐ
Apr 27, 2024
87968a1
[FIX] Spring ์ด๋ฏธ์ง€์— secret ๊ฐ’ ์ฃผ์ž…ํ•˜๋„๋ก ์„ค์ •
Apr 28, 2024
dd48670
[FIX] application-secret.properties ํŒŒ์ผ ์ƒ์„ฑํ•˜๋„๋ก ์ˆ˜์ •
Apr 28, 2024
bceaf46
[FEAT] Health Check ๋ฐฉ์‹ ์ˆ˜์ •
Apr 28, 2024
7be6628
[FEAT] Health Check ๋ฐฉ์‹ ์ˆ˜์ •
Apr 28, 2024
44adb7a
[FEAT] Health Check ๋ฐฉ์‹ ์ˆ˜์ •
Apr 28, 2024
f7bb9d0
[FIX] docker-compose.yml ์ˆ˜์ •
May 1, 2024
4d23c18
Merge branch 'develop' of https://github.com/sopt-makers/sopt-crew-baโ€ฆ
May 1, 2024
e2632c7
Merge branch 'develop' into feat/#145
May 1, 2024
d41f1f4
[FIX] deploy.sh์— ๋„์ปคํ—ˆ๋ธŒ ๋น„๋ฐ€๋ฒˆํ˜ธ ํ•˜๋“œ์ฝ”๋”ฉ ์‚ญ์ œ
May 1, 2024
63a54e4
[FEAT] Main, Dev ๋ฐฐํฌ ๋ฐฉ์‹ ๋ถ„๋ฆฌ
May 1, 2024
5bc99d0
[CHORE] ๋ถˆํ•„์š”ํ•œ ์ฃผ์„ ์ œ๊ฑฐ
May 1, 2024
ebdc677
[FEAT] PR ํ…œํ”Œ๋ฆฟ์— PR์ „ ์ ๊ฒ€์‚ฌํ•ญ ์ถ”๊ฐ€
May 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
## ๐Ÿ‘ฉโ€๐Ÿ’ป Contents

<!-- ์ž‘์—… ๋‚ด์šฉ์„ ์ ์–ด์ฃผ์„ธ์š” -->

## ๐Ÿ“ Review Note

<!-- PR๊ณผ์ •์—์„œ ๋“  ์ƒ๊ฐ์ด๋‚˜ ๊ฐœ์„ ํ•  ๋‚ด์šฉ์ด ์žˆ๋‹ค๋ฉด ์ ์–ด์ฃผ์„ธ์š”. -->

## ๐Ÿ“ฃ Related Issue

<!-- ๊ด€๋ จ ์ด์Šˆ๋ฅผ ์ ์–ด์ฃผ์„ธ์š”. -->

- closed #

## โœ… ์ ๊ฒ€์‚ฌํ•ญ

- [ ] docker-compose.yml ํŒŒ์ผ์— ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ํ•œ API์˜ ํฌ์›Œ๋”ฉ์„ ๋ณ€๊ฒฝํ•ด์คฌ๋‚˜์š”?
- [ ] Spring Secret ๊ฐ’์„ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ ์ถ”๊ฐ€ํ–ˆ๋‹ค๋ฉด Github Secret์—์„œ ์ˆ˜์ •์„ ํ•ด์คฌ๋‚˜์š”?
- [ ] Nestjs Secret ๊ฐ’์„ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ ์ถ”๊ฐ€ํ–ˆ๋‹ค๋ฉด Docker-Compose.yml ํŒŒ์ผ ๋ฐ ์ธ์Šคํ„ด์Šค ๋‚ด๋ถ€์˜ .env ํŒŒ์ผ์„ ์ˆ˜์ •ํ–ˆ๋‚˜์š”?
Comment on lines +17 to +19
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์˜คํ˜ธ ์ด๊ฑฐ ์ข‹๋„ค์š”!

55 changes: 55 additions & 0 deletions .github/workflows/cd-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Makers_Crew Dev CD
on:
workflow_run:
workflows: [ "Makers_Crew CI" ]
branches: [ "develop" ]
types: [ completed ]

push:
branches: [ "develop" ]
jobs:
deploy:
runs-on: ubuntu-22.04
env:
working-directory-spring: main
working-directory-nestjs: server
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Docker build ๊ฐ€๋Šฅํ•˜๋„๋ก ํ™˜๊ฒฝ ์„ค์ •
uses: docker/setup-buildx-action@v2

- name: Create application.properties from secret
run: |
echo "${{ secrets.APPLICATION_SECRET_SPRING_DEV }}" > ./main/src/main/resources/application-secret.properties
shell: bash

- name: Docker hub์— ๋กœ๊ทธ์ธ
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_LOGIN_USERNAME }}
password: ${{ secrets.DOCKERHUB_LOGIN_ACCESSTOKEN }}

- name: docker image ๋นŒ๋“œ ๋ฐ ํ‘ธ์‹œ (Spring)
run: |
docker build --platform linux/amd64 -t makerscrew/main .
docker push makerscrew/main
working-directory: ${{ env.working-directory-spring }}

- name: docker image ๋นŒ๋“œ ๋ฐ ํ‘ธ์‹œ (nestjs)
run: |
docker build --platform linux/amd64 -t makerscrew/server .
docker push makerscrew/server
working-directory: ${{ env.working-directory-nestjs }}

- name: ๋„์ปค ์ปจํ…Œ์ด๋„ˆ ์‹คํ–‰
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEV_SERVER_IP }}
username: ${{ secrets.DEV_SERVER_USER }}
key: ${{ secrets.DEV_SERVER_KEY }}
script: |
cd ~
chmod +x ./deploy.sh
./deploy.sh
55 changes: 55 additions & 0 deletions .github/workflows/cd-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Makers_Crew Main CD
on:
workflow_run:
workflows: [ "Makers_Crew CI" ]
branches: [ "main" ]
types: [ completed ]

push:
branches: [ "main" ]
jobs:
deploy:
runs-on: ubuntu-22.04
env:
working-directory-spring: main
working-directory-nestjs: server
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Docker build ๊ฐ€๋Šฅํ•˜๋„๋ก ํ™˜๊ฒฝ ์„ค์ •
uses: docker/setup-buildx-action@v2

- name: Create application.properties from secret
run: |
echo "${{ secrets.APPLICATION_SECRET_SPRING_PROD }}" > ./main/src/main/resources/application-secret.properties
shell: bash

- name: Docker hub์— ๋กœ๊ทธ์ธ
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_LOGIN_USERNAME }}
password: ${{ secrets.DOCKERHUB_LOGIN_ACCESSTOKEN }}

- name: docker image ๋นŒ๋“œ ๋ฐ ํ‘ธ์‹œ (Spring)
run: |
docker build --platform linux/amd64 -t makerscrew/main .
docker push makerscrew/main
working-directory: ${{ env.working-directory-spring }}

- name: docker image ๋นŒ๋“œ ๋ฐ ํ‘ธ์‹œ (nestjs)
run: |
docker build --platform linux/amd64 -t makerscrew/server .
docker push makerscrew/server
working-directory: ${{ env.working-directory-nestjs }}

- name: ๋„์ปค ์ปจํ…Œ์ด๋„ˆ ์‹คํ–‰
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.PROD_SERVER_IP }}
username: ${{ secrets.PROD_SERVER_USER }}
key: ${{ secrets.PROD_SERVER_KEY }}
script: |
cd ~
chmod +x ./deploy.sh
./deploy.sh
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Makers_Crew CI

on:
push:
branches:
- '**'

pull_request:
types: [ opened, synchronize, reopened ]
jobs:
build-springboot:
name: Build and analyze (SpringBoot)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'

- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}

- name: Create application.properties from secret
run: |
echo "${{ secrets.APPLICATION_SECRET_SPRING_DEV }}" > ./main/src/main/resources/application-secret.properties
shell: bash

- name: Build and analyze (SpringBoot)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd main
./gradlew clean build

# NsetJs ์„œ๋ฒ„์˜ ๊ฒฝ์šฐ ๋ณ€๊ฒฝ๋  ์‚ฌํ•ญ์ด ์—†๋‹ค๊ณ  ์ƒ๊ฐํ•˜์—ฌ CI ์ž‘์—… ์ƒ๋žต / ๋งŒ์•ฝ CI ์ž‘์—…์ด ํ•„์š”ํ•˜๋‹ค๋ฉด ๋งจ ๋ฐ‘์˜ ์ฃผ์„ ์ฐธ๊ณ 
# build-nestjs:
# name: Build and analyze (NestJS)
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0

# - name: Set up Node.js
# uses: actions/setup-node@v3
# with:
# node-version: '21'

# - name: Cache npm packages
# uses: actions/cache@v3
# with:
# path: server/node_modules
# key: ${{ runner.os }}-node-${{ hashFiles('server/package-lock.json') }}

# - name: Create .dev.env from secret
# run: |
# echo "${{ secrets.APPLICATION_SECRET_NESTJS_DEV }}" > ./server/.dev.env
# shell: bash

# - name: Build and analyze (NestJS)
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# cd server
# npm ci
# npm run start
# Create .dev.env ์ž‘์—…์„ ํ†ตํ•ด .dev.env ํŒŒ์ผ์„ ์ƒ์„ฑํ–ˆ์Œ์—๋„ CI ์ž‘์—…์ด ์‹คํŒจํ•จ.
76 changes: 0 additions & 76 deletions .github/workflows/dev-CD.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.vscode
/.idea/
/.idea/
Loading
Loading