Skip to content

Gitea

Gitea is a community managed lightweight code hosting solution written in Go. It is published under the MIT license.

egg-gitea.json

updated

Ports

Add an allocation on the node for each port.

  • App 3000
  • SSH 2020

Install

Installer image
ghcr.io/ptero-eggs/installers:debian
Install script
45 lines

Image

  • Debian ghcr.io/ptero-eggs/yolks:debian

Startup

The Panel runs this command to start the server. It replaces each variable in the command with the value of that variable.

3 variables

Startup command

./gitea web -p 3000 -c ./app.ini

Dotted values come from the server settings. These values are examples.

  • Disable SSH feature when it’s not available

    DISABLE_SSHUsers can see

    required|string|in:true,false

  • SSH port displayed in clone URL.

    SSH_PORTUsers can see

    required|integer|between:1024,65535

  • you can use latest, nightly or version (e.g. 1.18.1)

    VERSIONUsers can edit

    required|string|max:20

Wings

Stop command
^^C
Running when the console shows
Listen:

Files Wings edits

Wings sets these values in these files before each start.

custom/app.ini file

DISABLE_SSH
DISABLE_SSH: {{server.build.env.DISABLE_SSH}}
SSH_PORT
SSH_PORT: {{server.build.env.SSH_PORT}}

Readme

Gitea

Gitea is a community managed lightweight code hosting solution written in Go. It is published under the MIT license.

Supported Versions

You can set the version in Version variable. You can use following values:

latest - latest stable release nightly - latest Github master branch version - set the version according this page: https://dl.gitea.io/gitea

Server Ports

Ports required to run the server in a table format.

Port default
App 3000
SSH 2020

Changes

  1. fix docker images path

    · Daniel Barton · 7d2b714

  2. Replace docker images

    · Daniel Barton · 3759ed6

  3. Add software

    · rowansc1 · 9b56a00

All changes on GitHub

Problem with this egg?

Open an issue on GitHub. Include your Panel and Wings versions.

Install script 45 lines bash in ghcr.io/ptero-eggs/installers:debian Show
## Gitea Installscript

## update system
apt update
apt -y install --no-install-recommends jq curl ca-certificates

## Variables
ARCH=$([[ "$(uname -m)" == "x86_64" ]] && echo "amd64" || echo "arm64")
LATEST=$(curl -sSL https://dl.gitea.io/gitea/version.json | jq -r .latest.version)


cd /mnt/server

## install gitea
echo -e "Download url: https://dl.gitea.io/gitea/${LATEST}/gitea-${LATEST}-linux-${ARCH}"
if [ -z "${VERSION}" ] || [ "${VERSION}" == "latest" ]; then
    echo -e "downloading Gitea $LATEST"
    curl -sSL -o gitea https://dl.gitea.io/gitea/${LATEST}/gitea-${LATEST}-linux-${ARCH}
elif [ "${VERSION}" == "nightly" ]; then
    echo -e "downloading Gitea nightly"
    curl -sSL -o gitea https://dl.gitea.io/gitea/main/gitea-main-linux-${ARCH}
else
    curl -sSL -o gitea https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-${ARCH}
    echo -e "downloading Gitea $VERSION"
fi

chmod +x gitea

mkdir -p custom

if [ -f "/mnt/server/custom/app.ini" ]; then
    echo "config file exists"
else
    echo "[server]
    LOCAL_ROOT_URL = http://${SERVER_IP}:${SERVER_PORT}/
    DOMAIN           = ${SERVER_IP}
    HTTP_PORT        = ${SERVER_PORT}
    ROOT_URL         = http://${SERVER_IP}:${SERVER_PORT}/
    DISABLE_SSH      = ${DISABLE_SSH}
    SSH_PORT         = ${SSH_PORT}" > /mnt/server/custom/app.ini
fi

echo -e "-------------------------------------------------"
echo -e "Installation completed"
echo -e "-------------------------------------------------"