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

lnd-channels-backup-dependencies #11

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

Conversation

bereska
Copy link

@bereska bereska commented Feb 28, 2020

#270

@bereska
Copy link
Author

bereska commented Feb 28, 2020

btcpayserver/btcpayserver-docker#270
Hope I didn't miss the point)

@NicolasDorier
Copy link
Member

Sorry to take lot's of time to review it I was busy those last days, I should be more reactive from now:

  1. The tooling should be installed in the Dockerfile, not the script file so you don't have to download everytimes you start the container.
  2. The script should be an infinite loop saving the SCB somewhere everytimes the file change
  3. You should use tini utility to start your script, this prevent the container from hanging when you shut it down.

@bereska
Copy link
Author

bereska commented Mar 14, 2020

@NicolasDorier , no problem, thanks for your response. It's my turn to be more reactive).
My PR has 3 scripts:
lnd-channels-backup-dependencies.sh
lnd-channels-remote-backup-on-change.sh
lnd-channels-backup-systemd.sh

when you say 'tooling' do you mean all these scripts to be put in Dockerfile?
the problem I see is that lnd-channels-remote-backup-on-change.sh requires user input of remote server credentials (username & ip/hostname) and/or storage cloud credentials (name and auth token)
could you please guide me in the right direction how this could be implemented? I suspect that new ENV variables have to be added
thank you

@NicolasDorier
Copy link
Member

Right now, everytimes the container get started, this run

echo "Checking rsync and inotify..."
for pkgs in rsync inotify-tools; do
        if [ $(dpkg -s $pkgs 2>/dev/null | grep -c "ok installed") -eq 1 ]; then
                echo "$pkgs is already installed "
        else
                apt -yy install $pkgs
                echo "Successfully installed $pkgs "
        fi
done

Containers does not save anything so any restart, you'll install same package over and over.
That's what installing package must be done in the Dockerfile, not in the entrypoint.

@NicolasDorier
Copy link
Member

NicolasDorier commented Mar 16, 2020

Last, the entrypoint is not doing anything, except installing the dependencies and shutting down. (and deleting what it just installed as explained above)

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.

2 participants