initial commit
This commit is contained in:
12
backup.sh
Executable file
12
backup.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
NOW=$(date +"%Y%m%d-%H%M")
|
||||||
|
OUT="/backup/output/gitea-$NOW.tar.gz"
|
||||||
|
|
||||||
|
echo "== Gitea SQLite Backup $NOW =="
|
||||||
|
|
||||||
|
tar -czvf "$OUT" /data/gitea
|
||||||
|
|
||||||
|
echo "Backup saved as $OUT"
|
||||||
25
docker-compose.yaml
Normal file
25
docker-compose.yaml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
server:
|
||||||
|
image: docker.gitea.com/gitea:1.25.4
|
||||||
|
container_name: gitea
|
||||||
|
environment:
|
||||||
|
- USER_UID=1000
|
||||||
|
- USER_GID=1000
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
- "222:22"
|
||||||
|
backup:
|
||||||
|
image: alpine:latest
|
||||||
|
container_name: gitea-backup
|
||||||
|
volumes:
|
||||||
|
- ./data:/data:ro
|
||||||
|
- ./backup:/backup
|
||||||
|
- ./backup/crontab:/etc/crontabs/root:ro
|
||||||
|
entrypoint: /bin/sh -c "crond -f -l 2"
|
||||||
Reference in New Issue
Block a user