Forgejo is a community managed lightweight code hosting solution written in Go. It is published under the MIT license, and is a fork of Gitea.
Forgejo is a community managed lightweight code hosting solution written in Go. It is published under the MIT license.
You can set the version in Version variable. You can use following values:
latest - latest stable release version - set the version according to this page: https://forgejo.org/releases/
Ports required to run the server in a table format.
Port | default |
---|---|
App | 3000 |
SSH | 2020 |
Name | Tag |
---|---|
Debian | ghcr.io/ptero-eggs/yolks:debian |
Name | Description | Environment Variable | Default Value | User Viewable | User Editable |
---|---|---|---|---|---|
Disable SSH | Disable the SSH feature when it’s not available. | DISABLE_SSH | false | Yes | No |
SSH Port | SSH port displayed in clone URL. | SSH_PORT | 2020 | Yes | No |
Version | Use either `latest` or a specific version, such as `1.21.7-0`. | VERSION | latest | Yes | Yes |
## Forgejo Installscript
## Modified version of the Gitea installscript, see https://github.com/parkervcp/eggs/blob/master/software/gitea/egg-gitea.json
## update system
apt update
apt -y install --no-install-recommends jq curl ca-certificates dnsutils
## Variables
ARCH=$([[ "$(uname -m)" == "x86_64" ]] && echo "amd64" || echo "arm64")
LATEST=$(dig +short release.forgejo.org TXT | grep -oE '([0-9]+\.){2}[0-9]+(-[a-zA-Z0-9]+)*')
cd /mnt/server
## install forgejo
if [ -z "${VERSION}" ] || [ "${VERSION}" == "latest" ]; then
echo -e "Downloading Forgejo $LATEST (latest)"
URL=https://codeberg.org/forgejo/forgejo/releases/download/v${LATEST}/forgejo-${LATEST}-linux-${ARCH}
else
echo -e "Downloading Forgejo $VERSION"
URL=https://codeberg.org/forgejo/forgejo/releases/download/v${VERSION}/forgejo-${VERSION}-linux-${ARCH}
fi
echo -e "Download URL: $URL"
curl -sSL -o forgejo $URL
chmod +x forgejo
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 "-------------------------------------------------"