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

Open
3wordchant wants to merge 11 commits from feature/dockerfile into main
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
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
@ -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
Member

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
Member

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
Member

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
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
b956edb889
Make entrypoint executable
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
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
41c5229ffa
Update requirements
p4u1 reviewed 2024-04-14 10:31:22 +00:00
@ -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
Member

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 ?
Member

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
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
b2365ea824
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
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b feature/dockerfile main
git pull origin feature/dockerfile

Step 2:

Merge the changes and update on Gitea.
git checkout main
git merge --no-ff feature/dockerfile
git push origin main
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/backup-bot-two#49
No description provided.