Files
nicole 289769a601
Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 8s
Restructured Documentation
2026-09-05 14:08:43 -06:00

2.9 KiB

tags
tags
Containers
Docker
Containerization

Purpose

Docker container running Alpine Linux that automates and improves upon much of the script mentioned in the Git Repo Updater document. It offers the additional benefits of checking for updates every 5 seconds instead of every 60 seconds. It also accepts environment variables to provide credentials and notification settings, and can have an infinite number of monitored repositories.

!!! info "Earlier Configuration Delivery Approach" The Gitea runners blog records replacing this polling approach for the documented configuration-delivery use case. The configuration-delivery reference links both runner implementations and this retained watcher deployment.

Deployment

You can find the current up-to-date Gitea repository that includes the docker-compose.yml and .env files that you need to deploy everything here

version: '3.3'
services:
    git-repo-updater:
        privileged: true
        container_name: git-repo-updater
        env_file:
            - stack.env
        image: git.bunny-lab.io/container-registry/git-repo-updater:latest
        volumes:
           - /srv/containers:/srv/containers
           - /srv/containers/git-repo-updater/Repo_Cache:/root/Repo_Cache
        restart: always
# Gitea Credentials
GIT_USERNAME=nicole.rappe
GIT_PASSWORD=USE-AN-APP-PASSWORD

# NTFY Push Notification Server URL
NTFY_URL=https://ntfy.cyberstrawberry.net/git-repo-updater

# Repository/Destination Pairs (Add as Many as Needed)
REPO_01="https://${GIT_USERNAME}:${GIT_PASSWORD}@git.bunny-lab.io/bunny-lab/docs.git,/srv/containers/material-mkdocs/docs/docs"
REPO_02="https://${GIT_USERNAME}:${GIT_PASSWORD}@git.bunny-lab.io/GitOps/servers.bunny-lab.io.git,/srv/containers/homepage-docker"

Build / Development

If you want to learn how the container was assembled, the related build files are located here

# Use Alpine as the base image of the container
FROM alpine:latest

# Install necessary packages
RUN apk --no-cache add git curl rsync

# Add script
COPY repo_watcher.sh /repo_watcher.sh
RUN chmod +x /repo_watcher.sh

#Create Directory to store Repositories
RUN mkdir -p /root/Repo_Cache

# Start script (Alpine uses /bin/sh instead of /bin/bash)
CMD ["/bin/sh", "-c", "/repo_watcher.sh"]

Save the complete Git Repo Updater script as repo_watcher.sh next to the Dockerfile before building the image.