From 2215e8c784ba723b478e0e1c75aaeff1c9d0b377 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Fri, 10 May 2024 00:35:18 +0200 Subject: [PATCH] feat(gitea): add gitea's article and docker compose file --- docker/gitea/.gitignore | 6 ++ docker/gitea/Makefile | 7 ++ docker/gitea/config/app.defaults.ini | 98 ++++++++++++++++++++++++++++ docker/gitea/data/.gitkeep | 0 docker/gitea/docker-compose.yml | 19 ++++++ knowledge base/gitea.md | 20 ++++++ 6 files changed, 150 insertions(+) create mode 100644 docker/gitea/.gitignore create mode 100644 docker/gitea/Makefile create mode 100644 docker/gitea/config/app.defaults.ini create mode 100644 docker/gitea/data/.gitkeep create mode 100644 docker/gitea/docker-compose.yml create mode 100644 knowledge base/gitea.md diff --git a/docker/gitea/.gitignore b/docker/gitea/.gitignore new file mode 100644 index 0000000..4b428f9 --- /dev/null +++ b/docker/gitea/.gitignore @@ -0,0 +1,6 @@ +/config/* +!/config/*.defaults.ini +!/config/*.example.ini + +/data/* +!/data/.gitkeep diff --git a/docker/gitea/Makefile b/docker/gitea/Makefile new file mode 100644 index 0000000..d67893d --- /dev/null +++ b/docker/gitea/Makefile @@ -0,0 +1,7 @@ +#!/usr/bin/env make + +pre-flight: + @mkdir -p 'config' 'data' + +gitea-go-brrr: ${shell which 'docker-compose'} pre-flight + @docker-compose up -d diff --git a/docker/gitea/config/app.defaults.ini b/docker/gitea/config/app.defaults.ini new file mode 100644 index 0000000..4a840ab --- /dev/null +++ b/docker/gitea/config/app.defaults.ini @@ -0,0 +1,98 @@ +APP_NAME = Gitea: Git with a cup of tea +RUN_USER = git +RUN_MODE = prod +WORK_PATH = /var/lib/gitea + +[repository] +ROOT = /var/lib/gitea/git/repositories + +[repository.local] +LOCAL_COPY_PATH = /tmp/gitea/local-repo + +[repository.upload] +TEMP_PATH = /tmp/gitea/uploads + +[server] +APP_DATA_PATH = /var/lib/gitea +SSH_DOMAIN = localhost +HTTP_PORT = 3000 +ROOT_URL = http://localhost:3000/ +DISABLE_SSH = false +; In rootless gitea container only internal ssh server is supported +START_SSH_SERVER = true +SSH_PORT = 2222 +SSH_LISTEN_PORT = 2222 +BUILTIN_SSH_SERVER_USER = git +LFS_START_SERVER = true +DOMAIN = localhost +LFS_JWT_SECRET = Aa6-Offr7khQxK5XxEI2PhCahmnuWkp5uC3e7v4F4uI +OFFLINE_MODE = false + +[database] +PATH = /var/lib/gitea/data/gitea.db +DB_TYPE = sqlite3 +HOST = localhost:3306 +NAME = gitea +USER = root +PASSWD = +SCHEMA = +SSL_MODE = disable +LOG_SQL = false + +[session] +PROVIDER_CONFIG = /var/lib/gitea/data/sessions +PROVIDER = file + +[picture] +AVATAR_UPLOAD_PATH = /var/lib/gitea/data/avatars +REPOSITORY_AVATAR_UPLOAD_PATH = /var/lib/gitea/data/repo-avatars + +[attachment] +PATH = /var/lib/gitea/data/attachments + +[log] +ROOT_PATH = /var/lib/gitea/data/log +MODE = console +LEVEL = info + +[security] +INSTALL_LOCK = true +SECRET_KEY = +REVERSE_PROXY_LIMIT = 1 +REVERSE_PROXY_TRUSTED_PROXIES = * +INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE3MTUyNjc0NDh9.3ozgswOlcbE5Xxe0cnaPVjY3OgBKWm7MPnHwqv8DOrI +PASSWORD_HASH_ALGO = pbkdf2 + +[service] +DISABLE_REGISTRATION = false +REQUIRE_SIGNIN_VIEW = false +REGISTER_EMAIL_CONFIRM = false +ENABLE_NOTIFY_MAIL = false +ALLOW_ONLY_EXTERNAL_REGISTRATION = false +ENABLE_CAPTCHA = false +DEFAULT_KEEP_EMAIL_PRIVATE = false +DEFAULT_ALLOW_CREATE_ORGANIZATION = true +DEFAULT_ENABLE_TIMETRACKING = true +NO_REPLY_ADDRESS = noreply.localhost + +[lfs] +PATH = /var/lib/gitea/git/lfs + +[mailer] +ENABLED = false + +[openid] +ENABLE_OPENID_SIGNIN = true +ENABLE_OPENID_SIGNUP = true + +[cron.update_checker] +ENABLED = true + +[repository.pull-request] +DEFAULT_MERGE_STYLE = merge + +[repository.signing] +DEFAULT_TRUST_MODEL = committer + +[oauth2] +JWT_SECRET = MdHkCwxVnBDYhcJ0nlu0qmfgX-oX18WXagcFlIkWYmg diff --git a/docker/gitea/data/.gitkeep b/docker/gitea/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docker/gitea/docker-compose.yml b/docker/gitea/docker-compose.yml new file mode 100644 index 0000000..1454374 --- /dev/null +++ b/docker/gitea/docker-compose.yml @@ -0,0 +1,19 @@ +--- + +# sources: +# - https://docs.gitea.com/installation/install-with-docker-rootless + +version: '2' + +services: + server: + image: gitea/gitea:1.21.11-rootless + restart: unless-stopped + volumes: + - ${PWD}/data:/var/lib/gitea + - ${PWD}/config:/etc/gitea + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - 3000:3000 + - 2222:2222 diff --git a/knowledge base/gitea.md b/knowledge base/gitea.md new file mode 100644 index 0000000..30611d1 --- /dev/null +++ b/knowledge base/gitea.md @@ -0,0 +1,20 @@ +# Gitea + +1. [Further readings](#further-readings) + +## Further readings + +- [Website] + + + + + + + +[website]: https://about.gitea.com/ + +