Forgejo
ApplicationsForgejo is a community managed lightweight code hosting solution written in Go. It is published under the MIT license, and is a fork of Gitea.
README
Forgejo
Forgejo 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 version - set the version according to this page: https://forgejo.org/releases/
Server Ports
Ports required to run the server in a table format.
| Port | default |
|---|---|
| App | 3000 |
| SSH | 2020 |
Docker Images (1)
| Name | Image |
|---|---|
Debian | ghcr.io/ptero-eggs/yolks:debian |
Startup Command
./forgejo web -p {{SERVER_PORT}} -c ./app.ini Variables (3)
Disable SSH
Disable the 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
Use either `latest` or a specific version, such as `1.21.7-0`.
- Environment:
VERSION- Default:
latest- User Viewable:
- β
- User Editable:
- β
- Rules:
required|string|max:15
Installation Script
Container:
ghcr.io/ptero-eggs/yolks:debianEntrypoint:
bash## 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 "-------------------------------------------------"