Git Product home page Git Product logo

autogit's Introduction


AutoGit

A minimal Docker container for auto Git pull, simple auto versioning and easy access to Docker logs via a simple web server.


Project Description:

This project provides a minimal Docker container that automatically keeps a Git repository up-to-date and serves its logs through a simple web frontend. The container runs an auto-git script to check for updates and a Flask web server to display logs on port 8080. Users can configure the Git repository path using an environment variable (GITPATH) and access logs via the web frontend.

Key Features:

Automatic Git repository updates.
Automatic simple versioning (patch, minor, major)
Logs served through a simple web frontend.
Configurable Git repository path using GITPATH environment variable.

Usage:

Build the Docker container using the provided Dockerfile.
Run the container, specifying the desired Git repository path using the GITPATH environment variable.
Access the logs by visiting http://localhost:8080 in your web browser or using an HTTP client.

Deploy with docker:

version: "3.9"
services:
  autogit:
    container_name: autogit
    image: docker.io/sushibox/autogit:latest
    restart: always
    ports:
      - "8080:8080"
    environment:
      - GITPATH=/opt/github/repo  # Change this to the desired GITPATH
      - EXEC_INTERVAL=60  # Change this to the desired auto-git script interval in seconds
    volumes:
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"
      - ".logs:/var/logs"  # Change this to the desired log directory path
docker run -d --name autogit \
  -p 8080:8080 \
  -e GITPATH=/opt/github/repo \
  -e EXEC_INTERVAL=60 \
  -v /etc/timezone:/etc/timezone:ro \
  -v /etc/localtime:/etc/localtime:ro \
  -v .logs:/var/logs \
  docker.io/sushibox/autogit:latest

Note:

Using a reverse proxy, such as Traefik, Nginx, Caddy, or Apache, is recommended when deploying the container in production. A reverse proxy provides advanced features like SSL termination, load balancing, automatic certificate management, and easy integration with Docker. It enhances the overall web server setup, adding security and improved performance.

Example Docker Compose with Traefik v2:

version: "3.9"
services:
  autogit:
    image: docker.io/sushibox/autogit:latest
    container_name: autogit
    restart: always
    environment:
      - GITPATH=/opt/github/repo  # Change this to the desired GITPATH
      - EXEC_INTERVAL=60  # Change this to the desired auto-git script interval in seconds
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.autogit.rule=Host(`autogit.example.com`)"  # Replace with your domain
      - "traefik.http.routers.autogit.entrypoints=websecure"
    volumes:
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"
      - ".logs:/var/logs"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.