-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from woowacourse-teams/develop-backend
develop-backend 브랜치를 develop으로 머지
- Loading branch information
Showing
11 changed files
with
276 additions
and
65 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,27 @@ | ||
name: cd-dev | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop-backend | ||
|
||
jobs: | ||
deploy: | ||
runs-on: self-hosted | ||
|
||
steps: | ||
- name: change permission | ||
run: | | ||
sudo chown -R ubuntu:ubuntu /home/ubuntu/actions-runner/_work/2024-mouda | ||
- name: DockerHub login | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Docker Compose up | ||
run: | | ||
docker compose -f ./backend/docker-compose.yml down mouda-be | ||
docker compose -f ./backend/docker-compose.yml pull mouda-be | ||
docker compose -f ./backend/docker-compose.yml up -d mouda-be |
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,42 @@ | ||
name: ci-dev | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop-backend | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-24.04 | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./backend | ||
|
||
steps: | ||
- name: 레포지토리 체크아웃 | ||
uses: actions/checkout@v4 | ||
|
||
- name: JDK 17을 설치 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'corretto' | ||
|
||
- name: gradlew 권한 부여 | ||
run: chmod +x ./gradlew | ||
|
||
- name: Gradle 빌드 | ||
run: ./gradlew clean build -x test | ||
|
||
- name: DockerHub 로그인 | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: 도커 이미지 빌드 및 푸시 | ||
run: | | ||
docker buildx build ./ --platform=linux/arm64 -t 2024mouda/mouda-be:latest | ||
docker push 2024mouda/mouda-be:latest |
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,9 @@ | ||
FROM openjdk:17-jdk | ||
|
||
ARG JAR_FILE=./build/libs/backend-0.0.1-SNAPSHOT.jar | ||
|
||
COPY ${JAR_FILE} /app.jar | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["java", "-jar", "/app.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,11 @@ | ||
version: "3.7" # 파일 규격 버전 | ||
services: | ||
mouda-be: | ||
build: . | ||
container_name: mouda-be # 컨테이너 이름 설정 | ||
ports: | ||
- "8080:8080" | ||
command: | ||
- run | ||
- --cors | ||
- "*" |
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
6 changes: 6 additions & 0 deletions
6
backend/src/main/java/mouda/backend/moim/dto/request/MoimJoinRequest.java
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,6 @@ | ||
package mouda.backend.moim.dto.request; | ||
|
||
public record MoimJoinRequest( | ||
Long moimId | ||
) { | ||
} |
32 changes: 32 additions & 0 deletions
32
backend/src/main/java/mouda/backend/moim/dto/response/MoimDetailsFindResponse.java
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,32 @@ | ||
package mouda.backend.moim.dto.response; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalTime; | ||
|
||
import lombok.Builder; | ||
import mouda.backend.moim.domain.Moim; | ||
|
||
@Builder | ||
public record MoimDetailsFindResponse( | ||
String title, | ||
LocalDate date, | ||
LocalTime time, | ||
String place, | ||
int currentPeople, | ||
int maxPeople, | ||
String authorNickname, | ||
String description | ||
) { | ||
public static MoimDetailsFindResponse toResponse(Moim moim) { | ||
return MoimDetailsFindResponse.builder() | ||
.title(moim.getTitle()) | ||
.date(moim.getDate()) | ||
.time(moim.getTime()) | ||
.place(moim.getPlace()) | ||
.currentPeople(moim.getCurrentPeople()) | ||
.maxPeople(moim.getMaxPeople()) | ||
.authorNickname(moim.getAuthorNickname()) | ||
.description(moim.getDescription()) | ||
.build(); | ||
} | ||
} |
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
Oops, something went wrong.