Skip to content

Commit 8cd6c7d

Browse files
authored
[release] v1.0.0
1 parent c2e9132 commit 8cd6c7d

File tree

333 files changed

+21456
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+21456
-59
lines changed

.github/workflows/deploy.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Java CI/CD with Gradle
2+
3+
on:
4+
push:
5+
branches: [ "dev" ] # dev 브랜치에 푸시할 때 작동
6+
workflow_dispatch: #
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up JDK 21
15+
uses: actions/setup-java@v4
16+
with:
17+
java-version: '21'
18+
distribution: 'temurin'
19+
cache: 'gradle' # 캐싱 추가: 빌드 속도가 훨씬 빨라집니다.
20+
21+
- name: Build with Gradle
22+
run: |
23+
chmod +x ./gradlew
24+
./gradlew build -x test
25+
26+
- name: Create .env file from Secret
27+
run: |
28+
cat <<'EOF' > .env
29+
${{ secrets.ENV_VARIABLES }}
30+
EOF
31+
32+
- name: Copy JAR and .env to EC2
33+
uses: appleboy/scp-action@v0.1.7
34+
with:
35+
host: ${{ secrets.EC2_HOST }}
36+
username: ${{ secrets.EC2_USERNAME }}
37+
key: ${{ secrets.EC2_SSH_KEY }}
38+
# -plain.jar는 배포에 필요 없으므로 제외합니다.
39+
source: "build/libs/*-SNAPSHOT.jar, .env"
40+
target: "~/"
41+
strip_components: 2
42+
43+
- name: Deploy to EC2
44+
uses: appleboy/ssh-action@v1.0.3
45+
with:
46+
host: ${{ secrets.EC2_HOST }}
47+
username: ${{ secrets.EC2_USERNAME }}
48+
key: ${{ secrets.EC2_SSH_KEY }}
49+
script: |
50+
fuser -k 8080/tcp || true
51+
52+
chmod +x ~/start.sh
53+
~/start.sh

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,7 @@ out/
3737
.vscode/
3838

3939
### Setting ###
40-
.env
40+
.env
41+
postgres_data/
42+
src/main/resources/application-local.yml
43+
.claude

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ git push origin {생성한-브랜치-명}
100100
## 📂 Project Structure
101101

102102
```
103-
com.swyp.app
103+
com.swyp.picke
104104
├── AppApplication.java
105105
106106
├── domain

build.gradle

Lines changed: 57 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,83 @@
11
plugins {
2-
id 'java'
3-
id 'org.springframework.boot' version '4.0.3'
4-
id 'io.spring.dependency-management' version '1.1.7'
2+
id 'java'
3+
id 'org.springframework.boot' version '3.5.11'
4+
id 'io.spring.dependency-management' version '1.1.7'
55
}
66

7-
group = 'com.swyp'
7+
group = 'com.swyp.picke'
88
version = '0.0.1-SNAPSHOT'
9-
description = 'SWYP APP 4th'
9+
description = 'PICKE - SWYP APP 4th'
1010

1111
java {
12-
toolchain {
13-
languageVersion = JavaLanguageVersion.of(21)
14-
}
12+
toolchain {
13+
languageVersion = JavaLanguageVersion.of(21)
14+
}
1515
}
1616

1717
configurations {
18-
compileOnly {
19-
extendsFrom annotationProcessor
20-
}
18+
compileOnly {
19+
extendsFrom annotationProcessor
20+
}
2121
}
2222

2323
repositories {
24-
mavenCentral()
24+
mavenCentral()
25+
google()
2526
}
2627

2728
dependencies {
2829
// Web
29-
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
30+
implementation 'org.springframework.boot:spring-boot-starter-web'
31+
implementation 'org.springframework.boot:spring-boot-starter-validation'
32+
3033
// JPA
31-
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
34+
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
35+
3236
// Security
3337
implementation 'org.springframework.boot:spring-boot-starter-security'
34-
// Swagger
35-
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.1'
36-
// Lombok
38+
39+
// JWT
40+
implementation 'io.jsonwebtoken:jjwt-api:0.12.6'
41+
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6'
42+
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.6'
43+
44+
// HTTP Client (소셜 API 호출용)
45+
implementation 'org.springframework.boot:spring-boot-starter-webflux'
46+
47+
// AdMob SSV 검증을 위한 Tink 라이브러리
48+
implementation 'com.google.crypto.tink:apps-rewardedads:1.9.1'
49+
testImplementation 'com.google.crypto.tink:apps-rewardedads:1.9.1'
50+
51+
// Swagger
52+
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.16'
53+
54+
// Google Cloud TTS
55+
implementation 'com.google.cloud:google-cloud-texttospeech:2.58.0'
56+
57+
// AWS S3
58+
implementation 'io.awspring.cloud:spring-cloud-aws-starter-s3:3.3.0'
59+
60+
// Lombok
3761
compileOnly 'org.projectlombok:lombok'
3862
annotationProcessor 'org.projectlombok:lombok'
63+
3964
// devTools
40-
developmentOnly 'org.springframework.boot:spring-boot-devtools'
41-
// PostgreSQL
65+
developmentOnly 'org.springframework.boot:spring-boot-devtools'
66+
67+
// DB
4268
runtimeOnly 'org.postgresql:postgresql'
43-
// Test
44-
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa-test'
45-
testImplementation 'org.springframework.boot:spring-boot-starter-security-test'
46-
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
47-
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
69+
runtimeOnly 'com.h2database:h2'
70+
71+
// Thymeleaf
72+
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
73+
74+
// Test
75+
testRuntimeOnly 'com.h2database:h2'
76+
testImplementation 'org.springframework.boot:spring-boot-starter-test' // JPA, Web 테스트 기능 모두 포함
77+
testImplementation 'org.springframework.security:spring-security-test' // 시큐리티 전용 테스트
78+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
4879
}
4980

5081
tasks.named('test') {
51-
useJUnitPlatform()
52-
}
82+
useJUnitPlatform()
83+
}

docker-compose.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: '3.8'
2+
3+
services:
4+
db:
5+
image: postgres:15
6+
container_name: pique-postgres-db
7+
restart: always
8+
environment:
9+
POSTGRES_DB: ${DB_NAME}
10+
POSTGRES_USER: ${DB_USER}
11+
POSTGRES_PASSWORD: ${DB_PASSWORD}
12+
ports:
13+
- "${DB_PORT}:5432"
14+
volumes:
15+
- ./postgres_data:/var/lib/postgresql/data
16+
networks:
17+
- pique-network
18+
19+
networks:
20+
pique-network:
21+
driver: bridge

0 commit comments

Comments
 (0)