-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
83 lines (77 loc) · 2.73 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
plugins {
java
id("org.springframework.boot") version "3.3.0"
id("io.spring.dependency-management") version "1.1.5"
id("com.google.cloud.tools.jib") version "3.4.2"
}
group = "kr.mafoo"
version = "0.0.1-SNAPSHOT"
java {
sourceCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-data-r2dbc")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.flywaydb:flyway-core")
implementation("org.flywaydb:flyway-mysql")
implementation("org.springframework:spring-jdbc")
implementation("org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0")
implementation("com.mysql:mysql-connector-j:8.4.0")
implementation("io.asyncer:r2dbc-mysql:1.1.0")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("io.projectreactor:reactor-test")
testImplementation("org.springframework.security:spring-security-test")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
implementation("org.projectlombok:lombok:1.18.32")
annotationProcessor("org.projectlombok:lombok:1.18.32")
implementation("com.github.f4b6a3:ulid-creator:5.2.3")
implementation("io.awspring.cloud:spring-cloud-starter-aws:2.4.4")
implementation("io.micrometer:micrometer-tracing-bridge-otel:1.3.2")
implementation("io.opentelemetry:opentelemetry-exporter-zipkin:1.40.0")
implementation("io.micrometer:micrometer-registry-prometheus:1.13.2")
implementation("com.slack.api:slack-api-client:1.40.3")
implementation("net.bramp.ffmpeg:ffmpeg:0.8.0")
}
tasks.withType<Test> {
useJUnitPlatform()
}
jib {
val activeProfile: String? = System.getenv("SPRING_PROFILES_ACTIVE")
val imageName: String? = System.getenv("IMAGE_NAME")
val imageTag: String? = System.getenv("IMAGE_TAG")
val serverPort: String = System.getenv("SERVER_PORT") ?: "8080"
from {
image = "spinachpasta/photo-service-base:latest"
}
to {
image = imageName
tags = setOf(imageTag, "latest")
}
container {
jvmFlags =
listOf(
"-Dspring.profiles.active=$activeProfile",
"-Dserver.port=$serverPort",
"-Djava.security.egd=file:/dev/./urandom",
"-Dfile.encoding=UTF-8",
"-Duser.timezone=Asia/Seoul",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseContainerSupport",
"-XX:+UseG1GC",
"-Xms1500M",
"-Xmx3G",
"-XX:MaxRAMPercentage=80",
"-XX:MaxGCPauseMillis=200",
"-XX:+AlwaysPreTouch",
"-XX:+DisableExplicitGC", // System.gc() 방어
"-server",
)
ports = listOf(serverPort)
}
}