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

Reworked config #350

Merged
merged 15 commits into from
Jun 6, 2024
Merged

Reworked config #350

merged 15 commits into from
Jun 6, 2024

Conversation

zachmu
Copy link
Member

@zachmu zachmu commented Jun 6, 2024

This change reworks how the data dir, config file and related initialization values are loaded. The main effect is that it's now possible to run doltgres without a config.yaml file.

The sever config is now resolved in this order

  1. --config flag
  2. config.yaml file if present
  3. Built-in default config values

The data-dir for this config is then overridden as necessary with a similar pattern:

  1. --data-dir flag
  2. The value in a config.yaml file if, if a file was loaded
  3. The env var DOLTGRES_DATA_DIR
  4. The default ($home/doltgres/databases)

@zachmu zachmu requested a review from Hydrocharged June 6, 2024 00:19
Copy link
Collaborator

@Hydrocharged Hydrocharged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! We should do a small release after this is in

servercfg/config.go Show resolved Hide resolved
servercfg/config.go Outdated Show resolved Hide resolved
@zachmu zachmu merged commit 10ed1cd into main Jun 6, 2024
9 checks passed
@zachmu zachmu deleted the zachmu/config branch June 6, 2024 18:15
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.

None yet

2 participants