Move entrypoint script into Docker image
continuous-integration/drone/push Build is failing Details

This commit is contained in:
3wc 2024-04-09 22:36:18 -03:00
parent 200adc3c29
commit 5ea3fa442a
4 changed files with 2 additions and 16 deletions

View File

@ -6,6 +6,7 @@ RUN apk add --upgrade --no-cache restic bash python3 py3-pip
RUN pip install click==8.1.7 docker==6.1.3 resticpy==1.0.2
COPY backupbot.py /usr/bin/backup
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT /bin/bash
CMD /entrypoint.sh

View File

@ -1,4 +1,3 @@
export ENTRYPOINT_VERSION=v2
export BACKUPBOT_VERSION=v1
export SSH_CONFIG_VERSION=v1

View File

@ -19,10 +19,6 @@ 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
#entrypoint: ['tail', '-f','/dev/null']
healthcheck:
test: "pgrep crond"
@ -38,8 +34,3 @@ secrets:
volumes:
backups:
configs:
entrypoint:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh

View File

@ -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