add postgresql docker

This commit is contained in:
2025-03-27 01:49:56 +01:00
parent d02b2bb049
commit 097981112d
5 changed files with 80 additions and 4 deletions

View File

@@ -52,6 +52,39 @@ tasks.test {
dependsOn("composeUp")
}
tasks.register<Copy>("copyEnv") {
group = "docker"
description = "copy the default dotenv file"
from("/docker")
into("/docker")
rename {
println(it)
it.removeSuffix(".template")
}
include(".env.template")
eachFile {
if (File("docker/$name").exists()) {
exclude()
}
}
doLast {
val files =
listOf(
File("docker/pgadmin.secret"),
File("docker/postgresql.secret"),
)
files.forEach {
if (!it.exists()) {
it.writeText("")
}
}
}
}
tasks.composeUp {
dependsOn("copyEnv")
}
dependencies {
implementation("io.ktor:ktor-server-core-jvm")
implementation("io.ktor:ktor-server-auth-jvm")