-
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.
Merge branch 'develop' into feat/#43
- Loading branch information
Showing
285 changed files
with
6,662 additions
and
1,225 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
.github/workflows/dockerhub-push.yml → .github/workflows/dockerhub-push-go.yml
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,39 @@ | ||
name: Docker Hub Push for nodejs | ||
|
||
on: | ||
push: | ||
branches: | ||
- "music-uploader/develop" | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Environment Variables | ||
run: | | ||
BRANCH_NAME=$(echo $GITHUB_REF | awk -F'/' '{print $3}') | ||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | ||
- name: Build and Push Docker Image | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
BRANCH_NAME: ${{ env.BRANCH_NAME }} | ||
|
||
run: | | ||
if [ -n "$BRANCH_NAME" ]; then | ||
DOCKERFILE_DIR="src/backend/$BRANCH_NAME-server" | ||
else | ||
echo "Failed to extract branch name from GITHUB_REF." | ||
exit 1 | ||
fi | ||
cd $DOCKERFILE_DIR | ||
docker run --privileged --rm tonistiigi/binfmt --install all | ||
docker buildx create --use | ||
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
docker buildx build --platform=linux/amd64,linux/arm64 -t $DOCKER_USERNAME/$BRANCH_NAME:latest . --push |
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,39 @@ | ||
name: Docker Hub Push for python | ||
|
||
on: | ||
push: | ||
branches: | ||
- "search/develop" | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Environment Variables | ||
run: | | ||
BRANCH_NAME=$(echo $GITHUB_REF | awk -F'/' '{print $3}') | ||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | ||
- name: Build and Push Docker Image | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
BRANCH_NAME: ${{ env.BRANCH_NAME }} | ||
|
||
run: | | ||
if [ -n "$BRANCH_NAME" ]; then | ||
DOCKERFILE_DIR="src/backend/$BRANCH_NAME-server" | ||
else | ||
echo "Failed to extract branch name from GITHUB_REF." | ||
exit 1 | ||
fi | ||
cd $DOCKERFILE_DIR | ||
docker run --privileged --rm tonistiigi/binfmt --install all | ||
docker buildx create --use | ||
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
docker buildx build --platform=linux/amd64,linux/arm64 -t $DOCKER_USERNAME/$BRANCH_NAME:latest . --push |
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,71 @@ | ||
name: Docker Hub Push for SpringBoot 17 | ||
|
||
on: | ||
push: | ||
branches: | ||
- "alarm/develop" | ||
- "auth/develop" | ||
- "chatting/develop" | ||
- "feed/develop" | ||
- "gateway/develop" | ||
- "music/develop" | ||
- "playlist/develop" | ||
- "streaming/develop" | ||
- "user/develop" | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Environment Variables | ||
run: | | ||
BRANCH_NAME=$(echo $GITHUB_REF | awk -F'/' '{print $3}') | ||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | ||
- name: Cache Gradle dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
gradle- | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "17" | ||
distribution: "temurin" | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x src/backend/${{ env.BRANCH_NAME }}-server/gradlew | ||
|
||
- name: Build with Gradle | ||
run: | | ||
cd src/backend/${{ env.BRANCH_NAME }}-server | ||
./gradlew clean build -x test | ||
- name: Build and Push Docker Image | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
BRANCH_NAME: ${{ env.BRANCH_NAME }} | ||
|
||
run: | | ||
if [ -n "$BRANCH_NAME" ]; then | ||
DOCKERFILE_DIR="src/backend/$BRANCH_NAME-server" | ||
else | ||
echo "Failed to extract branch name from GITHUB_REF." | ||
exit 1 | ||
fi | ||
cd $DOCKERFILE_DIR | ||
docker run --privileged --rm tonistiigi/binfmt --install all | ||
docker buildx create --use | ||
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
docker buildx build --platform=linux/amd64,linux/arm64 -t $DOCKER_USERNAME/$BRANCH_NAME:latest . --push |
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,63 @@ | ||
name: Docker Hub Push for SpringBoot 21 | ||
|
||
on: | ||
push: | ||
branches: | ||
- "chart/develop" | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Environment Variables | ||
run: | | ||
BRANCH_NAME=$(echo $GITHUB_REF | awk -F'/' '{print $3}') | ||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | ||
- name: Cache Gradle dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
gradle- | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "21" | ||
distribution: "temurin" | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x src/backend/${{ env.BRANCH_NAME }}-server/gradlew | ||
|
||
- name: Build with Gradle | ||
run: | | ||
cd src/backend/${{ env.BRANCH_NAME }}-server | ||
./gradlew clean build -x test | ||
- name: Build and Push Docker Image | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
BRANCH_NAME: ${{ env.BRANCH_NAME }} | ||
|
||
run: | | ||
if [ -n "$BRANCH_NAME" ]; then | ||
DOCKERFILE_DIR="src/backend/$BRANCH_NAME-server" | ||
else | ||
echo "Failed to extract branch name from GITHUB_REF." | ||
exit 1 | ||
fi | ||
cd $DOCKERFILE_DIR | ||
docker run --privileged --rm tonistiigi/binfmt --install all | ||
docker buildx create --use | ||
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
docker buildx build --platform=linux/amd64,linux/arm64 -t $DOCKER_USERNAME/$BRANCH_NAME:latest . --push |
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
README.md | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
bin/ | ||
!**/src/main/**/bin/ | ||
!**/src/test/**/bin/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
!**/src/test/**/out/ | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
### VS Code ### | ||
.vscode/ |
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,25 @@ | ||
# Build - https://findstar.pe.kr/2022/05/13/gradle-docker-cache/ | ||
FROM gradle:8.6.0-jdk17 as builder | ||
WORKDIR /build | ||
|
||
# 그레이들 파일이 변경되었을 때만 새로운 의존성 다운로드 | ||
COPY build.gradle settings.gradle /build/ | ||
COPY alarm-api/build.gradle /build/alarm-api/ | ||
RUN gradle build -x test --parallel --continue > /dev/null 2>&1 || true | ||
|
||
# 빌더 이미지에서 애플리케이션 빌드 | ||
COPY . /build | ||
RUN gradle build -x test --parallel | ||
|
||
# Run | ||
FROM openjdk:17-jdk-slim | ||
WORKDIR /app | ||
|
||
COPY --from=builder /build/alarm-api/build/libs/*.jar app.jar | ||
|
||
ARG DOCKER_YML_FILE=src/main/resources/application.yml | ||
COPY ${DOCKER_YML_FILE} application.yml | ||
|
||
EXPOSE 28000 | ||
|
||
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,25 @@ | ||
# Getting Started | ||
|
||
### Reference Documentation | ||
For further reference, please consider the following sections: | ||
|
||
* [Official Gradle documentation](https://docs.gradle.org) | ||
* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/3.2.1/gradle-plugin/reference/html/) | ||
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.2.1/gradle-plugin/reference/html/#build-image) | ||
* [Spring Web](https://docs.spring.io/spring-boot/docs/3.2.1/reference/htmlsingle/index.html#web) | ||
* [Spring Data JPA](https://docs.spring.io/spring-boot/docs/3.2.1/reference/htmlsingle/index.html#data.sql.jpa-and-spring-data) | ||
|
||
### Guides | ||
The following guides illustrate how to use some features concretely: | ||
|
||
* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) | ||
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) | ||
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/) | ||
* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/) | ||
* [Accessing data with MySQL](https://spring.io/guides/gs/accessing-data-mysql/) | ||
|
||
### Additional Links | ||
These additional references should also help you: | ||
|
||
* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle) | ||
|
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,13 @@ | ||
bootJar { | ||
enabled = true | ||
} | ||
|
||
dependencies { | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||
runtimeOnly 'com.h2database:h2' | ||
runtimeOnly 'com.mysql:mysql-connector-j' | ||
|
||
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' | ||
|
||
implementation 'org.springframework.kafka:spring-kafka' | ||
} |
13 changes: 13 additions & 0 deletions
13
src/backend/alarm-server/alarm-api/src/main/java/com/lalala/alarm/AlarmApplication.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,13 @@ | ||
package com.lalala.alarm; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class AlarmApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(AlarmApplication.class, args); | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...larm-server/alarm-api/src/main/java/com/lalala/alarm/config/JpaAuditingConfiguration.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,9 @@ | ||
package com.lalala.alarm.config; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing; | ||
|
||
@Configuration | ||
@EnableJpaAuditing | ||
public class JpaAuditingConfiguration { | ||
} |
19 changes: 19 additions & 0 deletions
19
...nd/alarm-server/alarm-api/src/main/java/com/lalala/alarm/config/SwaggerConfiguration.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,19 @@ | ||
package com.lalala.alarm.config; | ||
|
||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.info.Info; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class SwaggerConfiguration { | ||
@Bean | ||
public OpenAPI openAPI() { | ||
return new OpenAPI() | ||
.info(new Info() | ||
.title("알람 API") | ||
.description("알람 API를 제공합니다.") | ||
.version("0.0.1") | ||
); | ||
} | ||
} |
Oops, something went wrong.