Add dockerfile, and compose.yml to use it #49
21
.drone.yml
21
.drone.yml
|
@ -2,11 +2,16 @@
|
|||
kind: pipeline
|
||||
name: linters
|
||||
steps:
|
||||
- name: run shellcheck
|
||||
image: koalaman/shellcheck-alpine
|
||||
commands:
|
||||
- shellcheck backup.sh
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
- name: publish image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username: 3wordchant
|
||||
password:
|
||||
from_secret: git_coopcloud_tech_token_3wc
|
||||
repo: git.coopcloud.tech/coop-cloud/backup-bot-two
|
||||
tags: 2.0.0
|
||||
|
||||
registry: git.coopcloud.tech
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
FROM docker:24.0.7-dind
|
||||
|
||||
RUN apk add --upgrade --no-cache restic bash python3 py3-pip py3-click py3-docker-py py3-json-logger curl
|
||||
|
||||
# Todo use requirements file with specific versions
|
||||
RUN pip install --break-system-packages resticpy==1.0.2
|
||||
|
||||
COPY backupbot.py /usr/bin/backup
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
moritz marked this conversation as resolved
moritz
commented
`RUN chmod +x /entrypoint.sh`
|
||||
|
||||
ENTRYPOINT /entrypoint.sh
|
||||
moritz marked this conversation as resolved
Outdated
moritz
commented
`ENTRYPOINT /entrypoint.sh`
|
1
abra.sh
1
abra.sh
|
@ -1,4 +1,3 @@
|
|||
export ENTRYPOINT_VERSION=v1
|
||||
export BACKUPBOT_VERSION=v1
|
||||
export SSH_CONFIG_VERSION=v1
|
||||
|
||||
|
|
20
compose.yml
20
compose.yml
|
@ -2,7 +2,7 @@
|
|||
version: "3.8"
|
||||
services:
|
||||
app:
|
||||
image: docker:24.0.7-dind
|
||||
image: git.coopcloud.tech/coop-cloud/backup-bot-two:2.0.0
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
- "/var/lib/docker/volumes/:/var/lib/docker/volumes/"
|
||||
|
@ -19,15 +19,7 @@ services:
|
|||
- coop-cloud.${STACK_NAME}.version=0.1.0+latest
|
||||
- coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-300}
|
||||
- coop-cloud.backupbot.enabled=true
|
||||
configs:
|
||||
- source: entrypoint
|
||||
target: /entrypoint.sh
|
||||
mode: 0555
|
||||
- source: backupbot
|
||||
target: /usr/bin/backup
|
||||
mode: 0555
|
||||
entrypoint: ['/entrypoint.sh']
|
||||
#entrypoint: ['tail', '-f','/dev/null']
|
||||
#entrypoint: ['tail', '-f','/dev/null']
|
||||
healthcheck:
|
||||
test: "pgrep crond"
|
||||
interval: 30s
|
||||
|
@ -42,11 +34,3 @@ secrets:
|
|||
|
||||
volumes:
|
||||
backups:
|
||||
|
||||
configs:
|
||||
entrypoint:
|
||||
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
|
||||
file: entrypoint.sh
|
||||
backupbot:
|
||||
name: ${STACK_NAME}_backupbot_${BACKUPBOT_VERSION}
|
||||
file: backupbot.py
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e -o pipefail
|
||||
|
||||
apk add --upgrade --no-cache restic bash python3 py3-pip py3-click py3-docker-py py3-json-logger curl
|
||||
|
||||
# Todo use requirements file with specific versions
|
||||
pip install --break-system-packages resticpy==1.0.2
|
||||
set -e
|
||||
|
||||
if [ -n "$SSH_HOST_KEY" ]
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue
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 ?