Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/compose.watch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/maps.example.json
Original file line number Diff line number Diff line change
@@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion docs/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
6 changes: 3 additions & 3 deletions tests/run_tests.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"))

Expand Down
Loading