diff --git a/docker/compose.watch.yaml b/docker/compose.watch.yaml index 91a7438..31cbad3 100644 --- a/docker/compose.watch.yaml +++ b/docker/compose.watch.yaml @@ -40,7 +40,7 @@ services: - /srv/minecraft/worlds:/worlds:ro # the directory holding the region folders named in maps.json networks: - # An existing Docker network where the database answers as "tidb" (see "db" in maps.json). + # An existing Docker network where the database answers under the host name set in "db" of maps.json. # Named by the game stack's compose file; set DB_NETWORK if yours differs. database: external: true diff --git a/docker/maps.example.json b/docker/maps.example.json index 8a5daf1..89f1f30 100644 --- a/docker/maps.example.json +++ b/docker/maps.example.json @@ -1,5 +1,5 @@ { - "db": { "host": "tidb", "port": 4000, "user": "renderer", "password_file": "/run/secrets/db_password", "database": "dynmap" }, + "db": { "host": "db.example.test", "port": 4000, "user": "renderer", "password_file": "/run/secrets/db_password", "database": "dynmap" }, "live": "wss://map.example.net/up/ws", "maps": [ { "id": 1, "name": "overworld", "region": "/worlds/overworld/region", "persp": "iso_SE_30_hires", "zoom_max": 12 }, diff --git a/docs/operations.md b/docs/operations.md index ac7b88e..ce546f8 100644 --- a/docs/operations.md +++ b/docs/operations.md @@ -32,7 +32,7 @@ ```json { - "db": { "host": "tidb", "port": 4000, "user": "renderer", "password_file": "/run/secrets/db_password", "database": "dynmap" }, + "db": { "host": "db.example.test", "port": 4000, "user": "renderer", "password_file": "/run/secrets/db_password", "database": "dynmap" }, "live": "wss://map.example.net/up/ws", "maps": [ { "id": 30002, "region": "/worlds/flat/region", "persp": "iso_SE_30_hires", "zoom_max": 7 } diff --git a/tests/run_tests.gd b/tests/run_tests.gd index 0c7ed11..e1ca313 100644 --- a/tests/run_tests.gd +++ b/tests/run_tests.gd @@ -614,9 +614,9 @@ func _args(words: Array) -> Args: func _test_config() -> void: OS.unset_environment("DYNMAP_DB_PASSWORD") OS.unset_environment("DYNMAP_DB_PASSWORD_FILE") - var cfg := {"db": {"host": "tidb", "port": 4000, "user": "renderer", "database": "dynmap"}} + var cfg := {"db": {"host": "db.example.test", "port": 4000, "user": "renderer", "database": "dynmap"}} var db := MapDef.db_config(_args(["run"]), cfg) - _eq("host from the config", db.get("host"), "tidb") + _eq("host from the config", db.get("host"), "db.example.test") _eq("user from the config", db.get("user"), "renderer") _ok("no password configured", not db.has("password")) _eq("the config is not modified", cfg["db"].has("password"), false) @@ -644,7 +644,7 @@ func _test_config() -> void: _eq("no connection without the password", store.connect_db(), false) _ok("the store reports why", store.error.contains("password file")) var nobody := TileStore.new() - nobody.configure({"host": "tidb"}) + nobody.configure({"host": "db.example.test"}) _eq("no connection without a user", nobody.connect_db(), false) _ok("the store asks for a user", nobody.error.contains("user"))