55 lines
1.1 KiB
Markdown
55 lines
1.1 KiB
Markdown
# Gitea Docker
|
|
|
|
A simple Docker Compose setup for running Gitea with Tailscale networking.
|
|
|
|
## Backup
|
|
|
|
This project includes a backup runner that uses Gitea's built-in `gitea dump` command.
|
|
|
|
### Manual Backup
|
|
|
|
```bash
|
|
./gitea-dump-backup.sh
|
|
```
|
|
|
|
### Automated Backup (Cron)
|
|
|
|
The backup runs automatically on the 1st of every month at 2:00 AM.
|
|
|
|
To install the cron job:
|
|
|
|
```bash
|
|
crontab ./gitea-backup.cron
|
|
```
|
|
|
|
Or append to existing crontab:
|
|
```bash
|
|
crontab -l | cat - ./gitea-backup.cron | crontab -
|
|
```
|
|
|
|
### Configuration
|
|
|
|
Edit the script variables to customize:
|
|
|
|
- `REMOTE_HOST`: Remote backup server (default: `workstation`)
|
|
- `REMOTE_PATH`: Remote backup path (default: `/mnt/data/git-backups`)
|
|
- `KEEP_LOCAL`: Number of local backups to keep (default: 3)
|
|
|
|
### Requirements
|
|
|
|
- SSH access to the remote backup server
|
|
- `rsync` installed locally
|
|
- Backup directory must exist on remote server
|
|
|
|
## Quick Start
|
|
|
|
1. Create the remote backup directory:
|
|
```bash
|
|
ssh workstation "mkdir -p /mnt/data/git-backups"
|
|
```
|
|
|
|
2. Start Gitea:
|
|
```bash
|
|
docker compose -f docker-compose.gitea.yml up -d
|
|
```
|