Gite es un proyecto de codigo abierto con el cual podemos poner en macha un servicio de Git en nuestra infraestructura, es un fork de Gogs
Implementaremos Gitea usando docker.
Descarga de imagen
Descarga de imagen de docker.
docker pull gitea/gitea:1.13.3
Creamos la carpeta gogs para el manejo de persistencia de datos de Gitea
mkdir gitea
Configuración
Creamos el archivo docker-compose.yml
version: "3"
networks:
gitea:
driver: overlay
services:
server:
image: gitea/gitea:1.13.3
environment:
- USER_UID=1000
- USER_GID=1000
restart: always
networks:
- gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3002:3000"
- "222:22"
- "8080:3000"
- "2221:22"
docker stack deploy -c docker-compose.yml gitea
Iniciar via web http://127.0.0.1:3002, en mi caso lo inicie de forma local, se puede utilizar como fuente de datos SQL Server, PostgreSQL, MySQL y SQLite
Los parametros de configuración de Gogs en el archivo app.ini ubicado en la ruta gitea/conf
APP_NAME = Gitea: Git with a cup of tea
RUN_MODE = prod
RUN_USER = git
[repository]
ROOT = /data/git/repositories
[repository.local]
LOCAL_COPY_PATH = /data/gitea/tmp/local-repo
[repository.upload]
TEMP_PATH = /data/gitea/uploads
[server]
APP_DATA_PATH = /data/gitea
DOMAIN = localhost
SSH_DOMAIN = localhost
HTTP_PORT = 3000
ROOT_URL = http://127.0.0.1:3002/
DISABLE_SSH = false
SSH_PORT = 22
SSH_LISTEN_PORT = 22
LFS_START_SERVER = true
LFS_CONTENT_PATH = /data/git/lfs
LFS_JWT_SECRET = 7J-2o408XeI7yYNzoTWC_EIZqK3p88rNKqM-z06p0f0
OFFLINE_MODE = false
[database]
PATH = /data/gitea/gitea.db
DB_TYPE = sqlite3
HOST = localhost:3306
NAME = gitea
USER = root
PASSWD =
LOG_SQL = false
SCHEMA =
SSL_MODE = disable
CHARSET = utf8
[indexer]
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
[session]
PROVIDER_CONFIG = /data/gitea/sessions
PROVIDER = file
[picture]
AVATAR_UPLOAD_PATH = /data/gitea/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars
DISABLE_GRAVATAR = false
ENABLE_FEDERATED_AVATAR = true
[attachment]
PATH = /data/gitea/attachments
[log]
MODE = console
LEVEL = info
REDIRECT_MACARON_LOG = true
MACARON = console
ROUTER = console
ROOT_PATH = /data/gitea/log
[security]
INSTALL_LOCK = true
SECRET_KEY = 8MaoqjIIwDSNp0lyrIw9MN9TVFRPX49qDCgRVxYXAZPkeds0svQPStTxlFfyfCvA
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE2MTY4ODkzODF9.PozGuVLrnO8D6kh4zayuHwQaFTXiKGf-Z8Wkk_0oWJ8
[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
[oauth2]
JWT_SECRET = _H5exVI9vx_7snkBmC-2smwpiGf-ffzyyhRBweiQtd0
[mailer]
ENABLED = false
[openid]
ENABLE_OPENID_SIGNIN = true
ENABLE_OPENID_SIGNUP = true
Gitea expone un API, http://127.0.0.1:3002/api/swagger
Referencia: https://gitea.io/