-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 named volume to lnd service for persisting data accross container… #2533
add named volume to lnd service for persisting data accross container… #2533
Conversation
Does this also replace #697? |
This is a much simpler change, so i would prefer sticking to this. |
SGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 👍
This is definitely needed. I based my mainnet lnd setup on these docker scripts and did this change when tweaking it. But there is one additional subtle change you should make. You should remove custom Line 54 in 2b43da4
By default, lnd logs into lnd's data folder |
Thanks @darwin. I've updated the PR to use the default home directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this has been lying around for so long. We'll be putting more focus on Docker stuff in the future.
There's a small nit in the comment.
And could you please also squash the two commits and a docker:
prefix to the commit message?
dacae4b
to
c41c5df
Compare
Thanks for the changes! I tested the tutorial again and it works as expected. Something went wrong with the commits, now there are 5 instead of one. Feel free to ping me on Slack if you need help with git. |
@guggero sure no problem! i'll rebase the commit history and ping you if needed. |
dadfb61
to
5c4edca
Compare
@guggero comments have been squashed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Add a named volume to
docker-compose.yml
for persisting lnd application volume state. Without this volume, if the container is brought down (for example usingdocker-compose down
) the state is lost, and lnd needs to resync, eg:lnd_btc | 2019-01-18 16:38:41.154 [INF] LNWL: Caught up to height 10000
Adding this volume will persist the state along with
btc
similar to how a local install would work. The new volume can be inspected usingdocker volume inspect docker_lnd
. Using a named volume indocker-compose
allowsdocker
to re-attach to the named volume duringdocker up
. This is preferable to an anonymous volume which isn't recognized bydocker-compose
and so this PR replaces #2507