initial commit
This commit is contained in:
commit
1ddb53fa97
10
.drone.yml
Normal file
10
.drone.yml
Normal file
@ -0,0 +1,10 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
|
||||
steps:
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: docker.kapelle.org/backup
|
||||
registry: docker.kapelle.org
|
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
*
|
||||
!.gitignore
|
||||
!Dockerfile
|
||||
!docker-compose.yml
|
||||
!entrypoint.sh
|
||||
!README.md
|
||||
!.drone.yml
|
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache mysql-client restic rclone
|
||||
|
||||
RUN mkdir /app && mkdir /config
|
||||
|
||||
COPY entrypoint.sh /app/entrypoint.sh
|
||||
|
||||
WORKDIR /config
|
||||
|
||||
VOLUME /config
|
||||
|
||||
ENTRYPOINT /app/entrypoint.sh
|
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
backup:
|
||||
build: .
|
||||
environment:
|
||||
- RCLONE_REMOTE=gdrive:/backup
|
||||
- RCLONE_CONFIG=/config/rclone.conf
|
||||
- RESTIC_PASSWORD=repopw
|
||||
volumes:
|
||||
- ./mounts:/backup
|
||||
- ./config:/config
|
9
entrypoint.sh
Executable file
9
entrypoint.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
[ -z "${RCLONE_REMOTE}" ] && echo "\$RCLONE_REMOTE is not set" && exit 1
|
||||
[ -z "${RCLONE_CONFIG}" ] && echo "\$RCLONE_CONFIG is not set" && exit 1
|
||||
[ -z "${RESTIC_PASSWORD}" ] && echo "\$RESTIC_PASSWORD is not set" && exit 1
|
||||
|
||||
restic -r "rclone:$RCLONE_REMOTE" --verbose backup "/backup"
|
Loading…
Reference in New Issue
Block a user