Add dockerfile, and compose.yml to use it #49
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/dockerfile"
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?
Closes #43
Also makes backupbot more similar to other coop cloud recipes, where the code is published as a docker image instead of being loaded into a container using a Docker config.
CC @moritz @p4u1 @knoflook @decentral1se
Add dockerfile and compose.yml to use itto Add dockerfile, and compose.yml to use it@ -0,0 +6,4 @@
RUN pip install click==8.1.7 docker==6.1.3 resticpy==1.0.2 --break-system-packages
COPY backupbot.py /usr/bin/backup
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
@ -0,0 +8,4 @@
COPY backupbot.py /usr/bin/backup
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT /bin/bash
ENTRYPOINT /entrypoint.sh
Looks great 🚀
I tried to deploy it, but it got stuck in a restart loop. As I changed the entrypoint in the compose file I could run it. I think the cleanest way would be to give
entrypoint.sh
execution permission and set this script directly as entrypoint.👏
@moritz thanks for review! I made
entrypoint.sh
executable in the repo and it seems to work now.I generally prefer setting
ENTRYPOINT
to a shell andCMD
to the script so thatdocker run -it ... bash
works without--entrypoint
but fine to change if there's a benefit to settingENTRYPOINT /entrypoint.sh
@ -13,0 +9,4 @@
password:
from_secret: git_coopcloud_tech_token_3wc
repo: git.coopcloud.tech/coop-cloud/backup-bot-two
tags: 2.0.0
Will his always update the
2.0.0
tag? Should this be kept in sync with the recipe version?Currently yes, all new commits would update 2.0.0, and we'd need to remember to manually bump this version when there are changes.
Normally I would suggest setting
tags: latest
, and settingauto_tag
so that tagged releases are released as separate versions. But, depending on the outcome of versioning discussions in #4, if we're continuing to use this repo as the coop cloud recipe as well then it could become quite complicated, because abra would assume that git tags would be recipe versions.Anyone have any ideas about this @decentral1se @moritz @p4u1 ?
Great work! It would be nice to have documentation on how to develop the backup bot (preferably locally). In think the workflow changed a bot with this change. We can also add this later though
Added #50 to track this
b2365ea824
to4d39d84733