Gitea
applicationsGitea is a community managed lightweight code hosting solution written in Go. It is published under the MIT license.
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 |
Docker Images (1)
| Name | Image |
|---|---|
ghcr.io/ptero-eggs/yolks:debian | ghcr.io/ptero-eggs/yolks:debian |
Startup Command
./gitea web -p {{SERVER_PORT}} -c ./app.ini Variables (3)
Disable SSH
Disable SSH feature when it’s not available
- Environment:
DISABLE_SSH- Default:
false- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|string|in:true,false
SSH Port
SSH port displayed in clone URL.
- Environment:
SSH_PORT- Default:
2020- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|integer|between:1024,65535
Version
you can use latest, nightly or version (e.g. 1.18.1)
- Environment:
VERSION- Default:
latest- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|string|max:20
Installation Script
Container:
ghcr.io/ptero-eggs/installers:debianEntrypoint:
bash## 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 "-------------------------------------------------"