mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-29 14:30:52 +00:00
fix(svc-db-postgres): build on the official multi-arch postgres 18 image
postgis/postgis publishes amd64 only, so every postgres consumer failed on arm64. The official postgres image serves both architectures and already ships the contrib extensions bloom, pg_trgm and unaccent. PostGIS moves into the postgres_libraries registry and is installed from PGDG (postgresql-18-postgis-3) only for a consumer that declares it as an extension, which is mobilizon alone. apt update reads every source list again, because the PostGIS package depends on GDAL from Debian main, which a PGDG-only update left without an install candidate. Postgres 18 keeps its cluster in /var/lib/postgresql/18/docker and its entrypoint treats a volume at the former /var/lib/postgresql/data as an old database, so the central and the dedicated data volume both mount at /var/lib/postgresql. Existing 17 clusters are not migrated: their data directory trips the entrypoint's old-data check and the container refuses to start. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
fb0e8e3e93
commit
f78ebe46a4
6 files changed
+24
-14
No files matched your search
@@ -53,13 +53,22 @@ class PostgresLibrariesLookupTests(unittest.TestCase):
|
||||
self.assertEqual(result[0]["apt_package"], "pgvector")
|
||||
|
||||
def test_base_extensions_are_filtered_out(self):
|
||||
result = self._run([["bloom", "postgis", "pg_trgm", "unaccent"]])[0]
|
||||
result = self._run([["bloom", "pg_trgm", "unaccent"]])[0]
|
||||
self.assertEqual(result, [])
|
||||
|
||||
def test_postgis_is_built_only_for_a_role_that_declares_it(self):
|
||||
result = self._run([["bloom", "postgis"]])[0]
|
||||
self.assertEqual(
|
||||
[(r["extension"], r["apt_package"]) for r in result],
|
||||
[("postgis", "postgis-3")],
|
||||
)
|
||||
|
||||
def test_mixed_extensions_returns_only_non_base(self):
|
||||
result = self._run([["bloom", "vector", "postgis"]])[0]
|
||||
self.assertEqual(len(result), 1)
|
||||
self.assertEqual(result[0]["extension"], "vector")
|
||||
self.assertEqual(
|
||||
[r["extension"] for r in result],
|
||||
["vector", "postgis"],
|
||||
)
|
||||
|
||||
def test_duplicates_are_deduplicated(self):
|
||||
result = self._run([["vector", "vector"]])[0]
|
||||
|
||||
Reference in new issue
Block a user