Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to load/replace servers.json every boot #8519

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LauJosefsen
Copy link

Hi.

This PR adds the env PGADMIN_REPLACE_SERVERS_ON_STARTUP do the Docker image.

If this env is set to true, the servers.json will be loaded on every container boot, with the --replace option.

The motivation for this change is to be able to define servers as part of the deployments / infrastructure as code instead of manually manipulating the pgadmin database state.

This should not introduce any breaking change, and will only differ in execution if PGADMIN_REPLACE_SERVERS_ON_STARTUP is set to true.

I have tested the image locally, with both PGADMIN_REPLACE_SERVERS_ON_STARTUP undefined and with it set to true. I have also tested both cases on an initialized database and on a non-initialized database.

@firecow
Copy link

firecow commented Mar 5, 2025

Uh, nice 😄

We could use this. We are forced to use some sort of IoC db row seeding solution at the moment.

@yogeshmahajan-1903 yogeshmahajan-1903 self-assigned this Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants