build(config): add docker support and project documentation
- Integrate Docker Spring Boot application plugin for containerization - Bump project version to 0.1 - Include MIT license and project README - Ignore IDE configuration files in version control
This commit is contained in:
+22
-1
@@ -3,10 +3,11 @@ plugins {
|
||||
kotlin("plugin.spring") version "2.2.21"
|
||||
id("org.springframework.boot") version "4.0.6"
|
||||
id("io.spring.dependency-management") version "1.1.7"
|
||||
id("com.bmuschko.docker-spring-boot-application") version "10.0.0"
|
||||
}
|
||||
|
||||
group = "com.msksbr"
|
||||
version = "0.0.1-SNAPSHOT"
|
||||
version = "0.1"
|
||||
description = "bookMgr"
|
||||
|
||||
java {
|
||||
@@ -58,3 +59,23 @@ tasks.bootJar {
|
||||
exclude("application-dev.yaml")
|
||||
}
|
||||
|
||||
val giteaRegistry = System.getenv("GITEA_REGISTRY") ?: "gitea.example.com"
|
||||
val giteaUser = System.getenv("GITEA_USERNAME") ?: ""
|
||||
val giteaToken = System.getenv("GITEA_TOKEN") ?: ""
|
||||
|
||||
docker {
|
||||
springBootApplication {
|
||||
baseImage.set("bellsoft/liberica-runtime-container:jre-21-slim-musl")
|
||||
ports.set(listOf(8080))
|
||||
images.set(setOf(
|
||||
"$giteaRegistry/$giteaUser/bookMgr:${project.version}",
|
||||
"$giteaRegistry/$giteaUser/bookMgr:latest"
|
||||
))
|
||||
jvmArgs.set(listOf("-Xmx512m", "-Dfile.encoding=UTF-8"))
|
||||
}
|
||||
registryCredentials {
|
||||
url.set("https://$giteaRegistry")
|
||||
username.set(giteaUser)
|
||||
password.set(giteaToken)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user