Super small code hosting platform.
docker run --detach --name gitea --publish 3022:3022 --publish 3000:3000 hetsh/gitea
docker stop gitea
Gitea is configured via its web interface. A configuration wizard will guide you through the initial setup if you run the server for the first time. If you want to reuse a existing configuration, it needs to contain these parameters:
[repository]
ROOT = /gitea/repos ;change this path to your repos
SCRIPT_TYPE = sh
[server]
START_SSH_SERVER = true
SSH_PORT = 3022
STATIC_ROOT_PATH = /usr/share/webapps/gitea
[log]
ROOT_PATH = /var/log/gitea
Mount the existing configuration and make sure the gitea user (id 1360) has RW permissions:
docker run --mount type=bind,source=/path/to/config.ini,target=/etc/gitea/app.ini ...
STORAGE="/path/to/storage"
mkdir -p "$STORAGE"
chown -R 1360:1360 "$STORAGE"
1360 is the numerical id of the user running the server (see Dockerfile).
The user must have RW access to the storage directory.
Start the server with the additional mount flags:
docker run --mount type=bind,source=/path/to/storage,target=/gitea ...
Synchronizing the timezones will display the correct time in the logs. The timezone can be shared with this mount flag:
docker run --mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly ...
The systemd unit can be found in my GitHub repository.
systemctl enable gitea --now
By default, the systemd service assumes /apps/gitea/app.ini for config, /apps/gitea/data for storage and /etc/localtime for timezone.
Since this is a personal systemd unit file, you might need to adjust some parameters to suit your setup.
This is an open project hosted on GitHub. Please feel free to ask questions, file an issue or contribute to it.
Content type
Image
Digest
sha256:b60e297eb…
Size
76.5 MB
Last updated
2 days ago
docker pull hetsh/gitea