Repository navigation
fix(setup): create the panel Postgres at 18.6, keep existing services as they are - #54
Merged
Merged
Conversation
…ces as they are The setup script still created PostgreSQL 16 after the project moved to the 18.6 pin, and on every run it updated an existing service with the image and mounts from the script. Changing only the image would make an existing 16 data volume look empty to PostgreSQL 18, so: - a new service is created from postgres:18.6 with PGDATA=/var/lib/postgresql/data, so the mount path that existing volumes use stays the same - an existing service keeps its current image and mounts; only the other settings are refreshed, and no image is pulled - a failed image pull warns and continues, so an image that is already on the machine still works offline - a failed update, or a failed service lookup other than "not found", now stops the setup with the error instead of printing "already exists" Tests cover the new service spec, the existing-service path, and the offline pull fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Updating an existing service replaced its whole container spec. On a service created by the installer that dropped the Docker secret and the password file variable, and the PGDATA variable pointed outside the volume of a PostgreSQL 18 service mounted at /var/lib/postgresql, which would start an empty cluster. The setup script now only creates the service when it is missing. PGDATA is set only in the create spec. Existing services are not touched, so nothing restarts. Tests cover an existing service with a secret and the 18 mount path (no update, no create, no pull), a lookup error other than not found, and a conflict on create. Co-Authored-By: Claude Sonnet 5.5 <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.
Summary
The setup script (
bun run setup) still created PostgreSQL 16 after the project moved to the 18.6 pin. The installer already uses 18.6 for fresh installs.Behaviour
postgres:18.6withPGDATA=/var/lib/postgresql/data. The mount path stays the one existing volumes use.Notes
PGDATAvariable on the first run, so the database task restarts once. The data stays in the volume.Test plan
apps/dokployvitest on__test__/setup/postgres-setup.test.ts: 3 passed.biome checkandtsc --noEmitpass in both packages.🤖 Generated with Claude Code