-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
๐ Fix: ๋ก๊ทธ์ธ ์๋ฃ ์ ๋ฉ์ธ ํ์ด์ง๋ก ๋ฆฌ๋ค์ด๋ ํธ ๋๋๋ก ์์ (#7)
* Feat: Member DB ์์ - ํ๊ธ์ด๋ฆ, ์์ด์ด๋ฆ, ๊ธฐ์, ๊ณผ์ ์ถ๊ฐ - ๊ณผ์ ํํํ๋ Enumerate ์ถ๊ฐ - ์์ ์ ๋ฐ๋ฅธ ์ค๋ฅ ์์ - getNickname -> getKoreaName of getEnglishName Related to: #2 * Rename: Member DB Field ์ด๋ฆ ๋ณ๊ฒฝ Related to: #2 * Feat: /api/auth/member ๊ด๋ จ DTO ์์ฑ Related to: #2 * Feat: /api/auth/member API ๊ด๋ จ DTO ๋ด์ฉ ์ถ๊ฐ Related to: #2 * Feat: /api/auth/member ๊ด๋ จ MemberService ์ถ๊ฐ Related to: #2 * Feat: /api/auth/member ๊ด๋ จ MemberContoller ์ถ๊ฐ Related to: #2 * Feat: CORS Error ์์ Related to: #2 * Fix: RefreshToken ๋งค๋ฒ ์์ฑ ์ค๋ฅ ์์ Related to: #2 * Refactor: ์ฝ๋ ๋ฆฌ๋ทฐ ๋ด์ฉ ๋ฐ์ - ๋ถํ์ ์ฝ๋ ์ญ์ - ๋ฐํ๊ฐ ์ค๋ฅ ์์ Related to: #2 * Test: MemberRepository Test ์ฝ๋ ์ถ๊ฐ Related to: #2 * Chore: Test์ฉ application yml ์ถ๊ฐ Related to: #2 * ์นด์นด์ค ํ์๊ฐ์ /๋ก๊ทธ์ธ, /api/auth/member API ๊ธฐ๋ฅ ์ถ๊ฐ (#6) * โจ ์นด์นด์ค ๋ก๊ทธ์ธ/ํ์๊ฐ์ ๊ตฌํ (#3) * Style: codeStyle ์ถ๊ฐ * Feat: Member, Profile Entity, MemberRepository ์ถ๊ฐ + MemberRepositoryTest ์ถ๊ฐ Related to: #1 * Feat: ์นด์นด์ค ๋ก๊ทธ์ธ, ํ์๊ฐ์ ๊ธฐ๋ฅ ์ถ๊ฐ - ๊ถํ ํ์ํ API ์ ์ ์ ์นด์นด์ค ๋ก๊ทธ์ธ ํ์ด์ง ๋ฐํ - ๋ก๊ทธ์ธ ์ฑ๊ณต ์ ๊ฐ์ ์ด ์๋์ด์์ผ๋ฉด ๊ฐ์ , ๋์ด์์ผ๋ฉด ๊ถํ ๋ถ์ฌ - ๊ถํ์ JWT ๋ฐ๊ธ ํ ์ฟ ํค์ ์ถ๊ฐ, ๋งค ์์ฒญ๋ง๋ค JwtFilter๋ฅผ ๊ฑฐ์น๋ฉฐ ์ฟ ํค์ Jwt ํ Related to: #1 * Style: ์ฝ๋ ํฌ๋งท, ๋น๋ฐ๋ฒํธ ๋ ธ์ถ ๋ฑ ์์ Related to: #1 * โจ /api/auth/member API ๊ธฐ๋ฅ ์ถ๊ฐ (#4) * Feat: Member DB ์์ - ํ๊ธ์ด๋ฆ, ์์ด์ด๋ฆ, ๊ธฐ์, ๊ณผ์ ์ถ๊ฐ - ๊ณผ์ ํํํ๋ Enumerate ์ถ๊ฐ - ์์ ์ ๋ฐ๋ฅธ ์ค๋ฅ ์์ - getNickname -> getKoreaName of getEnglishName Related to: #2 * Rename: Member DB Field ์ด๋ฆ ๋ณ๊ฒฝ Related to: #2 * Feat: /api/auth/member ๊ด๋ จ DTO ์์ฑ Related to: #2 * Feat: /api/auth/member API ๊ด๋ จ DTO ๋ด์ฉ ์ถ๊ฐ Related to: #2 * Feat: /api/auth/member ๊ด๋ จ MemberService ์ถ๊ฐ Related to: #2 * Feat: /api/auth/member ๊ด๋ จ MemberContoller ์ถ๊ฐ Related to: #2 * Feat: CORS Error ์์ Related to: #2 * Fix: RefreshToken ๋งค๋ฒ ์์ฑ ์ค๋ฅ ์์ Related to: #2 * Refactor: ์ฝ๋ ๋ฆฌ๋ทฐ ๋ด์ฉ ๋ฐ์ - ๋ถํ์ ์ฝ๋ ์ญ์ - ๋ฐํ๊ฐ ์ค๋ฅ ์์ Related to: #2 * Chore: DB๋ฅผ MariaDB -> H2๋ก ๋ณ๊ฒฝ Ralted to: #5 * Test: Test์ฉ application ์ถ๊ฐ Related to: #5 * Feat: ๊นํ๋ธ ์ก์ ์์ฑ Related to: #5 * Feat: ๋์ปค ํ์ผ ์์ฑ Related to: #5 * Feat: ํ ์คํธ์ฉ ๋์ปค ์ปดํฌ์ฆ ํ์ผ ์์ฑ Related to: #5 * Refactor: import ์ถ๊ฐ * Fix: ๊นํ๋ธ ์ก์ ์คํ ์์ Related to: #5 * Feat: SSL ์ ์ฉ * Fix: SSL ์์ * Fix: SSL ์์ ์คํฌ๋ฆฝํธ ์์ * Fix: SSL ์คํฌ๋ฆฝํธ ์์ * Fix: SSL ์คํฌ๋ฆฝํธ ์์ * Feat: ์นด์นด์ค ๋ก๊ทธ์ธ ์๋ฃ ์ ๋ฉ์ธ ํ์ด์ง๋ก redirect Related to: #1 --------- Co-authored-by: ๋ฐ์งํ <[email protected]>
- Loading branch information
1 parent
91a283f
commit f12a0b4
Showing
8 changed files
with
191 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Build and Push Docker Image and Deploy | ||
|
||
# main, dev ๋ธ๋์น์ push or PR ์ด ์ค๋ฉด ์คํ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
# ๋์ปค ์ด๋ฏธ์ง ๋น๋, ํธ์ | ||
build_and_push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# DB ์ธํ ์ ๋ณด ์ ๋ ฅ | ||
- name: Set up application.yml | ||
run: | | ||
echo "${{ secrets.APPLICATION }}" > ./src/main/resources/application.yml | ||
echo "${{ secrets.APPLICATION_TEST }}" > ./src/main/resources/application-test.yml | ||
# SSL ์ ์ฉ | ||
- name: Create SSH Key File | ||
run: echo "${{ secrets.PRIVATE_KEY }}" > /tmp/private_key.pem | ||
|
||
- name: Set Permissions for SSH Key | ||
run: chmod 600 /tmp/private_key.pem | ||
|
||
- name: Copy keystore.p12 from EC2 | ||
run: scp -o StrictHostKeyChecking=no -i /tmp/private_key.pem ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }}:/home/${{ secrets.EC2_USER }}/keystore.p12 ./src/main/resources/keystore.p12 | ||
|
||
# ๋์ปค ์ด๋ฏธ์ง ๋น๋์ฉ ํ๊ฒฝ ์ธํ ๋ฐ ๋์ปค ์ด๋ฏธ์ง ๋น๋ | ||
- name: set up test DB and docker build | ||
run: | | ||
docker compose -f docker-compose-auth-test-db.yml up -d # ๋์ปค ์ปดํฌ์ฆํ์ผ๋ก ํ ์คํธ ํ๊ฒฝ ์ธํ | ||
DOCKER_BUILDKIT=0 docker build --network testNet -t ${{ secrets.DOCKER_IMAGE_NAME }}:latest . # ๋์ปค ๋น๋ (๋น๋ ๊ณผ์ ์์ ๋คํธ์ํฌ ์ฌ์ฉ์ ์ํด ๋น๋ํท 0) | ||
docker compose -f docker-compose-auth-test-db.yml down # ํ ์คํธ ํ๊ฒฝ ์ ๊ฑฐ (๋คํธ์ํฌ๊น์ง ์ญ์ ๋จ) | ||
# ๋์ปค ๋ก๊ทธ์ธ | ||
- name: docker Login | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
# ๋์ปค ์ด๋ฏธ์ง push | ||
- name: push docker images | ||
run: | | ||
docker push ${{ secrets.DOCKER_IMAGE_NAME }}:latest | ||
# ๋์ปค ์ด๋ฏธ์ง EC2 ์ธ์คํด์ค์ ๋ฐฐํฌ | ||
deploy_to_ec2: | ||
needs: build_and_push | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- name: Deploy to EC2 | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.EC2_HOST }} # EC2 IP ์ฃผ์ | ||
username: ${{ secrets.EC2_USER }} # EC2 ์ฌ์ฉ์ | ||
key: ${{ secrets.PRIVATE_KEY }} # pem ํค | ||
|
||
# ๊ธฐ์กด ์ปจํ ์ด๋ ์ค์ง | ||
script: | | ||
CONTAINER_ID=$(sudo docker ps -aq --filter "name=kaboo-auth") | ||
if [ ! -z "$CONTAINER_ID" ]; then | ||
sudo docker stop $CONTAINER_ID || true | ||
sudo docker rm -f $CONTAINER_ID || true | ||
fi | ||
# ์ต์ ๋์ปค ์ด๋ฏธ์ง๋ก ์ปจํ ์ด๋ ์คํ | ||
sudo docker pull ${{ secrets.DOCKER_IMAGE_NAME }}:latest # ๋์ปค ์ต์ ์ด๋ฏธ์ง ๋ค์ด๋ก๋ | ||
# ๋์ปค ์ด๋ฏธ์ง ์คํ (host.docker.internal ์ฌ์ฉ ๊ฐ๋ฅํ๋๋ก) | ||
docker run --name kaboo-auth -d --add-host host.docker.internal:host-gateway -p 8081:8081 ${{ secrets.DOCKER_IMAGE_NAME }}:latest | ||
sudo docker image prune -f # ๊ตฌ๋ฒ์ ์ ๋์ปค ์ด๋ฏธ์ง ์ ๊ฑฐ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Build | ||
FROM eclipse-temurin:17-jdk AS build | ||
LABEL authors="pjh5365" | ||
|
||
WORKDIR /src | ||
COPY . /src | ||
RUN ./gradlew build | ||
|
||
# Run | ||
FROM eclipse-temurin:17-jre | ||
EXPOSE 8081 | ||
COPY --from=build /src/build/libs/*SNAPSHOT.jar kaboo-auth.jar | ||
|
||
ENTRYPOINT ["java", "-jar", "kaboo-auth.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# ํ ์คํธ DB ํ๊ฒฝ ์ธํ | ||
services: | ||
redis: | ||
image: redis:alpine | ||
container_name: redis | ||
ports: | ||
- "6379:6379" | ||
networks: | ||
- testNet | ||
|
||
networks: | ||
testNet: | ||
name: testNet # ๋คํธ์ํฌ ์ด๋ฆ ์ง์ | ||
driver: bridge # ๋ธ๋ฆฟ์ง ๋ชจ๋ | ||
attachable: true # ์ธ๋ถ์ ์ ํ์ฉ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters