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

Server: Config defaults to root and Datadir #193

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a-mpch
Copy link
Contributor

@a-mpch a-mpch commented Nov 8, 2024

Should close #183

Changed my mind on this, we might wanna think a bit broader on these config files and data_dir as stated in this comment.

Drafting for now

In this PR

Similar to bitcoin ~/.bitcoin/bitcoin.conf and ~/.lnd/lnd.conf, we add data_dir as default path to store conf file.
Added some prevalence root project conf.file wouldn't be overriden by datadir conf file.

How can i test it?

Add some files with different configurations:

  • lndk.conf in root project
  • ~/.lndk/lndk.conf in datadir

Test which configurations are used. Easy way to do it is to point to different lnd servers and point address in each file to each of them.

Why this?

Standardness and ease when deploying

LNDK is already using a datadir to store TLS certificates.
In this PR we expect lndk.conf file to be either in root of the project
or the data_dir as defaults. Precedence is root > data_dir.
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (925ce05) to head (41230ce).

Files with missing lines Patch % Lines
src/main.rs 0.00% 14 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##           master    #193   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files           1       1           
  Lines         126     136   +10     
======================================
- Misses        126     136   +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@a-mpch a-mpch marked this pull request as draft November 8, 2024 20:18
@dunxen
Copy link
Collaborator

dunxen commented Nov 8, 2024

Thanks. I'll have a closer look this weekend. Catching up.

@dunxen
Copy link
Collaborator

dunxen commented Nov 9, 2024

I'm happy to have this PR be the "follow-up" to #192 as discussed in #192 (comment) 😄. Would you be okay to broaden the scope a bit as I imagine there's a dependency there anyway?

@a-mpch
Copy link
Contributor Author

a-mpch commented Nov 9, 2024

@dunxen sure, i'll take it!

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.

Feature: make the default value for --conf as ~/.lndk/lndk.conf.
2 participants