WIP: Dockerize #1
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "yksflip/backup-bot-two:dockerize"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hey,
I gave the backup-bot a first shot on a Dockerfile.
open things:
For me, a per backupbot cron schedule would be sufficient. Per App would probably also be more complicated to implement.
Using a volume could be easy, but I think that wouldn't fit well in how abra usually works?
Maybe secrets/envs (key, known-hosts) that are copied into ~/.ssh/ on startup.
Some inspiration was taken from https://github.com/djmaze/resticker
Oh wow, this is fantastic!
I wrote my own Dockerfile at the weekend, I shamefully didn't push it at the time, but I'll have a careful look and grab the best bits from both!
Having a global schedule seems like an amazing idea, I'll personally be using swarm-cronjob but I think your approach is likely to be useful to more people, so let's do both?
Again, I'd be leaning on docker secrets for these personally, and I'll put an example in the repo too -- but anything that works in more places seems like a huge plus!
OK, I think all these changes are now incorporated, thank you again!
crond
is now default,swarm-cronjob
is optionalcompose.yml
now includes yourbuild: .
line so we can dodocker-compose build
SSH_HOST_KEY
(use the full line from.ssh/known_hosts
), or you can disable checking withSSH_HOST_KEY_DISABLE=1
I added a
CRON_SCHEDULE
variable, and an entrypoint which loads that into the crontab.This is working as well! I had to use a raw
docker secret create
instead of the equivalentabra
commands to load in the private key, otherwise it added newlines which SSH didn't like:DOCKER_CONTEXT=swarm.example.com docker secret create backup_swarm_example_com_ssh_key_v1 id_rsa
@yksflip does this sound good? Down to close this PR, or is there anything I missed?
awesome, thank you so much!
Pull request closed