feat(server): make both servers deployable as container images (#147)

This commit is contained in:
LananaHWP authored and GitHub committed 2026-08-10 17:05:02 +02:00
1 parent 70449971cb
commit aba1226794
33 files changed
+825 -40

No files matched your search

@@ -7,7 +7,7 @@ data class DbConfig(
val user: String = "openmmo_game_user",
val password: String = "changeMe!",
val poolSize: Int = 4,
val seedDev: Boolean = true,
val seedDev: Boolean = false,
) {
val jdbcUrl: String
get() = "jdbc:postgresql://$host:$port/$name"
@@ -24,7 +24,8 @@ db {
password = ${?GAME_DB_PASSWORD}
poolSize = 4
poolSize = ${?GAME_DB_POOL_SIZE}
# Applies the dev seed data in db/dev. Turn off in production.
seedDev = true
# Applies the dev seed data in db/dev, including the admin account. The gradle run task turns
# this on, so a plain launch of a built distribution never seeds.
seedDev = false
seedDev = ${?GAME_DB_SEED_DEV}
}
@@ -6,6 +6,7 @@ import de.fiereu.openmmo.common.hasPermission
import de.fiereu.openmmo.server.game.config.ConfigLoader
import de.fiereu.openmmo.server.game.testsupport.FakeCharacterRepository
import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.collections.shouldBeEmpty
import io.kotest.matchers.shouldBe
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
@@ -13,7 +14,18 @@ import kotlinx.coroutines.test.runTest
@OptIn(ExperimentalCoroutinesApi::class)
class DevCharacterSeederTest :
FunSpec({
val config = ConfigLoader.load()
val loaded = ConfigLoader.load()
val config = loaded.copy(db = loaded.db.copy(seedDev = true))
test("the shipped config does not seed, whatever the caller does") {
runTest {
val store = CharacterStore(FakeCharacterRepository(), EntityIdService(), backgroundScope)
DevCharacterSeeder(store, loaded).seed()
store.getCharactersByUser(1).shouldBeEmpty()
}
}
test("seeds one developer character per region on its new game start") {
runTest {