Skip to content

Gitea

Gitea is used to have local git repos. I typically use it as a backup (mirror) of my GitHub repos.

🛠 Installation

Default Port: 3000

Configuration path: /etc/gitea/

Custom path: /var/lib/gitea/custom/

bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/gitea.sh)"
bash -c "$(wget -qLO - https://github.com/asylumexp/Proxmox/raw/main/ct/gitea.sh)"

âš™ Config

Make symlinks to repo.

catppuuccin Catppuccin

Info

Gitea 1.20 or newer is required for this theme.

  1. Download the latest GitHub release.
  2. Place the CSS files inside Gitea's configuration directory:
  3. Gitea 1.21.0 or newer: $GITEA_CUSTOM/public/assets/css
  4. Otherwise: $GITEA_CUSTOM/public/css
  5. Add the themes to your app.ini. For further information on customizing Gitea, see the Gitea documentation.
  6. Restart your Gitea instance.
  7. Select the theme in Gitea > Account > Settings > Appearance.

Flavor-Accent

/etc/gitea/app.ini

[ui]
THEMES = catppuccin-latte-rosewater,catppuccin-latte-flamingo,catppuccin-latte-pink,catppuccin-latte-mauve,catppuccin-latte-red,catppuccin-latte-maroon,catppuccin-latte-peach,catppuccin-latte-yellow,catppuccin-latte-green,catppuccin-latte-teal,catppuccin-latte-sky,catppuccin-latte-sapphire,catppuccin-latte-blue,catppuccin-latte-lavender,catppuccin-frappe-rosewater,catppuccin-frappe-flamingo,catppuccin-frappe-pink,catppuccin-frappe-mauve,catppuccin-frappe-red,catppuccin-frappe-maroon,catppuccin-frappe-peach,catppuccin-frappe-yellow,catppuccin-frappe-green,catppuccin-frappe-teal,catppuccin-frappe-sky,catppuccin-frappe-sapphire,catppuccin-frappe-blue,catppuccin-frappe-lavender,catppuccin-macchiato-rosewater,catppuccin-macchiato-flamingo,catppuccin-macchiato-pink,catppuccin-macchiato-mauve,catppuccin-macchiato-red,catppuccin-macchiato-maroon,catppuccin-macchiato-peach,catppuccin-macchiato-yellow,catppuccin-macchiato-green,catppuccin-macchiato-teal,catppuccin-macchiato-sky,catppuccin-macchiato-sapphire,catppuccin-macchiato-blue,catppuccin-macchiato-lavender,catppuccin-mocha-rosewater,catppuccin-mocha-flamingo,catppuccin-mocha-pink,catppuccin-mocha-mauve,catppuccin-mocha-red,catppuccin-mocha-maroon,catppuccin-mocha-peach,catppuccin-mocha-yellow,catppuccin-mocha-green,catppuccin-mocha-teal,catppuccin-mocha-sky,catppuccin-mocha-sapphire,catppuccin-mocha-blue,catppuccin-mocha-lavender

Auto

This ensures that the theme automatically switches between light (latte) and dark (mocha) mode.

/etc/gitea/app.ini

[ui]
THEMES = catppuccin-rosewater-auto,catppuccin-flamingo-auto,catppuccin-pink-auto,catppuccin-mauve-auto,catppuccin-red-auto,catppuccin-maroon-auto,catppuccin-peach-auto,catppuccin-yellow-auto,catppuccin-green-auto,catppuccin-teal-auto,catppuccin-sky-auto,catppuccin-sapphire-auto,catppuccin-blue-auto,catppuccin-lavender-auto

Code

(
  [ -d /var/lib/gitea/custom/public/assets/css ] || mkdir -p /var/lib/gitea/custom/public/assets/css
  wget https://github.com/catppuccin/gitea/releases/latest/download/catppuccin-gitea.tar.gz -O /tmp/catppuccin-gitea.tar.gz && \
  tar -xvf /tmp/catppuccin-gitea.tar.gz -C /var/lib/gitea/custom/public/assets/css && \
  systemctl restart gitea.service
)

Traefik

homelab/pve/traefik/conf.d/gitea.yaml
---
http:
 #region routers 
  routers:
    gitea:
      entryPoints:
        - "websecure"
      rule: "Host(`gitea.l.nicholaswilde.io`)"
      middlewares:
        - default-headers@file
        - https-redirectscheme@file
      tls: {}
      service: gitea

#endregion
#region services
  services:
    gitea:
      loadBalancer:
        servers:
          - url: "http://192.168.2.20:3000"
        passHostHeader: true
#endregion

Task List

task: Available tasks for this project:
* decrypt:       Decrypt .env using SOPS
* encrypt:       Encrypt .env using SOPS
* export:        Export the task list
* init:          Init
* mklinks:       Make client symlinks
* restart:       Restart service
* status:        Status
* stop:          Stop service
* update:        Update running containers

🔗 References