15 Commits

Author SHA1 Message Date
c1a7ffd9e8 try 4
All checks were successful
Build and Push Docker Image / build (push) Successful in 45s
2025-10-23 17:24:45 -07:00
b528097b00 step4
Some checks failed
Build and Push Docker Image / build (push) Failing after 8s
2025-10-23 17:16:43 -07:00
035811115e try 3
Some checks failed
Build and Push Docker Image / build (push) Failing after 8s
2025-10-23 17:08:05 -07:00
f1ddee1b6e step2
Some checks failed
Build and Push Docker Image / build (push) Failing after 8s
2025-10-23 16:02:40 -07:00
1b0631d4e8 test 2
Some checks failed
Build and Push Docker Image / build (push) Failing after 8s
2025-10-23 15:43:10 -07:00
6192b18a49 learning something new
Some checks failed
Build and Push Docker Image / build (push) Failing after 8s
2025-10-23 15:27:46 -07:00
fd222fc92a one two buckle my show
Some checks failed
Docker Image CI / build-and-push-image (push) Failing after 8s
2025-10-23 15:16:54 -07:00
bbc5245793 testing new workflow
Some checks failed
Docker Image CI / build-and-push-image (push) Has been cancelled
2025-10-23 14:57:42 -07:00
cacd0086c1 badges are fun
All checks were successful
Build and Push Docker Image / build (push) Successful in 43s
2025-10-23 13:44:30 -07:00
d13c54c8df learning badges
Some checks failed
Build and Push Docker Image / build (push) Failing after 6s
2025-10-23 13:32:20 -07:00
874adb4e2e worked on README
Some checks failed
Build and Push Docker Image / build (push) Failing after 6s
2025-10-23 13:24:05 -07:00
f5d9f0e458 fixed the repo
Some checks failed
Build and Push Docker Image / build (push) Failing after 8s
2025-10-23 13:16:08 -07:00
3a838a92f9 and then it hit me
Some checks failed
Build and Push Docker Image / build (push) Failing after 7s
2025-10-23 12:59:50 -07:00
1d8c32eac3 im at a loss 2025-10-23 12:58:50 -07:00
dd9d6feb57 first commit of bot config 2025-10-23 12:57:22 -07:00
4 changed files with 21 additions and 64 deletions

View File

@@ -4,8 +4,8 @@ on:
push:
branches:
- main
- develop
pull_request:
tags:
- "v*"
jobs:
build:
@@ -24,12 +24,23 @@ jobs:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: gitea.calahilstudios.com/${{ github.repository_owner }}/${{ github.event.repository.name }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: |
gitea.calahilstudios.com/${{ github.repository_owner }}/${{ github.event.repository.name }}:develop
gitea.calahilstudios.com/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -2,8 +2,12 @@
[![License](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
[![Docker](https://img.shields.io/badge/Docker-Enabled-2496ED?logo=docker&logoColor=white)](https://www.docker.com/)
[![Build Status](https://gitea.calahilstudios.com/api/badges/owner/backupbot/status.svg)](https://gitea.calahilstudios.com/owner/backupbot)
[![Gitea](https://img.shields.io/badge/Gitea-calahilstudios.com-609926?logo=gitea&logoColor=white)](https://gitea.calahilstudios.com)
![Gitea Stars](https://img.shields.io/gitea/stars/calahil/backupbot?gitea_url=https%3A%2F%2Fgitea.calahilstudios.com&logo=gitea&link=https%3A%2F%2Fgitea.calahilstudios.com)
![Gitea Release](https://img.shields.io/gitea/v/release/calahil/backupbot?gitea_url=https%3A%2F%2Fgitea.calahilstudios.com&display_name=tag&logo=gitea&link=https%3A%2F%2Fgitea.calahilstudios.com%2Fcalahil%2Fbackupbot%2Freleases)
[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/duplicati.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/linuxserver/duplicati)
[![Docker Stars](https://img.shields.io/docker/stars/linuxserver/duplicati.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/duplicati)
> **Automated Docker backup system for PostgreSQL databases and application configurations with Duplicati integration**

View File

@@ -1,8 +0,0 @@
TZ=America/Los_Angeles
BACKUP_DIR=/backups/postgres
LOG_FILE=/config/log/pgbackup.log
MAX_RETRIES=3
GOTIFY_URL=http://gotify.example.com
GOTIFY_TOKEN=your_gotify_token_here
BACKUP_HOUR=03
BACKUP_MINUTE=00

View File

@@ -1,50 +0,0 @@
#!/usr/bin/env python3
import cgi
import cgitb
import os
import json
cgitb.enable()
print("Content-Type: application/json\n")
ENV_FILE = "/config/web/backupbot.env"
def read_env():
env = {}
if os.path.exists(ENV_FILE):
with open(ENV_FILE) as f:
for line in f:
line = line.strip()
if not line or line.startswith("#") or "=" not in line:
continue
key, val = line.split("=", 1)
key = key.strip()
val = val.strip().split("#")[0].strip() # strip inline comments
env[key] = val
return env
def write_env(env):
with open(ENV_FILE, "w") as f:
for key, val in env.items():
f.write(f"{key}={val}\n")
form = cgi.FieldStorage()
action = form.getvalue("action")
if action == "get":
env = read_env()
print(json.dumps(env))
elif action == "set":
try:
raw = os.environ.get("CONTENT_LENGTH")
length = int(raw) if raw else 0
data = json.loads(os.read(0, length))
write_env(data)
print(json.dumps({"status": "ok", "message": "Configuration saved."}))
except Exception as e:
print(json.dumps({"status": "error", "message": str(e)}))
else:
print(json.dumps({"status": "error", "message": "Invalid action"}))