Files
gitea/README.md
Márcio Fernandes ce26f9df92
Some checks failed
/ build-docker-image (push) Failing after 8s
refactoring act-runner-network-stack, added action kubectl-setup
2025-11-22 13:11:53 +00:00

3.7 KiB
Raw Blame History

Gitea

Backup And Restore

Source - https://docs.gitea.io/en-us/backup-and-restore/

Gitea dump from docker host

# exec          -> execute
# -u            -> container name
# -w            -> working directory on container 
# bash -c "x"   -> execute bash with command x

/usr/bin/docker exec -u git -w /tmp/backups gitea bash -c "/app/gitea/gitea dump"



#export to import to postgres (migrating from mysql to postgres)
sudo docker exec -u git -it -w /tmp gitea bash -c '/app/gitea/gitea dump -d postgres'

nginx

    location / {
        proxy_pass http://git_limbosolutions_com-gitea:80;
        proxy_redirect off;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Url-Scheme $scheme;
    }

act runner

act runner (Official)

Docker Compose

...
  gitea:
    image: gitea/gitea
    ...

  runner:
    image: gitea/act_runner
    restart: always
    depends_on:
      - gitea
    volumes:
      - ./data/act_runner:/data
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - GITEA_INSTANCE_URL=<instance url>
      # When using Docker Secrets, it's also possible to use
      # GITEA_RUNNER_REGISTRATION_TOKEN_FILE to pass the location.
      # The env var takes precedence.
      # Needed only for the first start.
      - GITEA_RUNNER_REGISTRATION_TOKEN=<registration token>

custom act runner - gitea/act_runner:0.2.13-network-stack

🚀 Purpose

This container equips the Gitea Actions runner with a networkaware toolchain, making it suitable for continuous deployments in environments where DockerinDocker or elevated privileges are not available.

  • Kubernetesfriendly: ships with kubectl and supporting utilities so it can interact directly with clusters.
  • No privileged mode required: avoids the need for Docker socket mounts or root escalation.
  • CI/CD ready: includes SSH, Ansible, Node.js, rsync, rclone, and envsubst for orchestration, templating, and asset transfer.

📦 Installed packages

  • 🛡️ openssh-client, 🌐 curl, ⚙️ ansible, 🟦 nodejs, 🔄 rclone, 📤 rsync, and 🔧 envsubst via Alpines apk package manager
  • 🔑 SSH and curl → remote access and HTTP requests
  • ⚙️ Ansible → configuration management and automation
  • 🟦 Node.js → JavaScript runtime for workflows
  • 🔄 Rclone and rsync → file synchronization and transfer
  • 🔧 envsubst → environment variable substitution in templates
  • ☸️ kubectl → fetches the latest stable Kubernetes CLI directly from Google Cloud Storage

Docker pull

docker pull git.limbosolutions.com/kb/gitea/act_runner:0.2.13-network-stack

Dockerfile source file.

Other References