Add dockerfile, and compose.yml to use it #49

Merged
3wordchant merged 11 commits from feature/dockerfile into main 2024-06-01 03:36:08 +00:00
Owner

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

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
3wordchant added 8 commits 2024-04-10 01:42:53 +00:00
Remove redundant stuff from entrypoint
Some checks failed
continuous-integration/drone/push Build is failing
b73aaaca14
Move entrypoint script into Docker image
Some checks failed
continuous-integration/drone/push Build is failing
5ea3fa442a
Add --break-system-packages, surely we don't need a virtualenv
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
b1263e2240
3wordchant changed title from Add dockerfile and compose.yml to use it to Add dockerfile, and compose.yml to use it 2024-04-10 01:43:00 +00:00
moritz reviewed 2024-04-10 10:41:52 +00:00
Dockerfile Outdated
@ -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
Owner

RUN chmod +x /entrypoint.sh

`RUN chmod +x /entrypoint.sh`
moritz marked this conversation as resolved
Dockerfile Outdated
@ -0,0 +8,4 @@
COPY backupbot.py /usr/bin/backup
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT /bin/bash
Owner

ENTRYPOINT /entrypoint.sh

`ENTRYPOINT /entrypoint.sh`
moritz marked this conversation as resolved
moritz requested changes 2024-04-10 10:45:25 +00:00
moritz left a comment
Owner

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.

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.
decentral1se reviewed 2024-04-11 06:57:50 +00:00
decentral1se left a comment
Owner

👏

👏
3wordchant added 1 commit 2024-04-12 16:34:26 +00:00
Make entrypoint executable
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
b956edb889
Author
Owner

@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 and CMD to the script so that docker run -it ... bash works without --entrypoint but fine to change if there's a benefit to setting ENTRYPOINT /entrypoint.sh

@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 and `CMD` to the script so that `docker run -it ... bash` works without `--entrypoint` but fine to change if there's a benefit to setting `ENTRYPOINT /entrypoint.sh`
3wordchant added 1 commit 2024-04-13 16:18:35 +00:00
Update requirements
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
41c5229ffa
p4u1 reviewed 2024-04-14 10:31:22 +00:00
.drone.yml Outdated
@ -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
Owner

Will his always update the 2.0.0 tag? Should this be kept in sync with the recipe version?

Will his always update the `2.0.0` tag? Should this be kept in sync with the recipe version?
Author
Owner

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 setting auto_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 ?

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 setting `auto_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 ?
Owner

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

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
Author
Owner

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

> 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
3wordchant added 1 commit 2024-04-15 02:02:27 +00:00
Switch ENTRYPOINT to try to resolve loop on start
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
b2365ea824
3wordchant force-pushed feature/dockerfile from b2365ea824 to 4d39d84733 2024-06-01 03:35:53 +00:00 Compare
3wordchant merged commit 68e37f5c23 into main 2024-06-01 03:36:08 +00:00
3wordchant deleted branch feature/dockerfile 2024-06-01 03:36:08 +00:00
Sign in to join this conversation.
No description provided.