chore(compose): drop redundant init-databases.sql (apps self-create their dbs)#13
Merged
Merged
Conversation
…their dbs Both apps create their own database on first boot: Aidbox always, and the engine since 1.4.0 (the ensure-database step). Pre-creating interbox + aidbox via an initdb SQL is therefore redundant on current versions (.env.example ships 1.4.2). Verified empirically: with the init SQL gone and a fresh volume, `docker compose up` on 1.4.2 creates both `interbox` and `aidbox` databases and boots — engine logs "ensuring database exists…" then "migrations applied"; Aidbox creates its own db after an initial retry. Note: requires engine >= 1.4.0 (older images have no self-create step and would need the db pre-created). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Both apps create their own database on first boot, so pre-creating them via an
initdbSQL is redundant on current versions:ensure-databasestep)..env.exampleships1.4.2.Verified empirically
With the init SQL gone and a fresh volume,
docker compose upon 1.4.2:interboxandaidboxdatabases,ensuring database exists…→migrations applied successfully,(Also observed the negative case: on the old 1.3.1 image — which predates
ensure-database— the engine does not self-create and needs the db pre-created.)Changes
compose/init-databases.sqland itspgvolume mount.pgcomment to note both apps self-create.Caveat
Requires engine ≥ 1.4.0 (older images have no self-create step).
.env.exampleis already1.4.2.🤖 Generated with Claude Code