Add dockerfile, and compose.yml to use it #49
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-packagesCOPY backupbot.py /usr/bin/backupCOPY entrypoint.sh /entrypoint.shRUN chmod +x /entrypoint.sh@ -0,0 +8,4 @@COPY backupbot.py /usr/bin/backupCOPY entrypoint.sh /entrypoint.shENTRYPOINT /bin/bashENTRYPOINT /entrypoint.shLooks 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.shexecution permission and set this script directly as entrypoint.👏
@moritz thanks for review! I made
entrypoint.shexecutable in the repo and it seems to work now.I generally prefer setting
ENTRYPOINTto a shell andCMDto the script so thatdocker run -it ... bashworks without--entrypointbut fine to change if there's a benefit to settingENTRYPOINT /entrypoint.sh@ -13,0 +9,4 @@password:from_secret: git_coopcloud_tech_token_3wcrepo: git.coopcloud.tech/coop-cloud/backup-bot-twotags: 2.0.0Will his always update the
2.0.0tag? 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_tagso 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
b2365ea824to4d39d84733