Skip to content

Commit

Permalink
feat: add Gitea module (#238)
Browse files Browse the repository at this point in the history
This is a module for `Gitea` self-hostded git server.
It's quite usefull to test various git clients with http/https/ssh
access to public and private git repos.

Gitea documentation: https://docs.gitea.com/
Gitea repo: https://github.com/go-gitea/gitea
  • Loading branch information
alex-karpenko authored Nov 5, 2024
1 parent 3bb9f1b commit f7999eb
Show file tree
Hide file tree
Showing 4 changed files with 1,009 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dynamodb = []
databend = ["http_wait"]
elastic_search = []
elasticmq = []
gitea = ["http_wait", "dep:rcgen"]
google_cloud_sdk_emulators = []
hashicorp_vault = []
k3s = []
Expand Down Expand Up @@ -59,6 +60,7 @@ pulsar = []
[dependencies]
# TODO: update parse-display after MSRV>=1.80.0 bump of `testcontainer-rs` and `testcontainers-modules`
parse-display = { version = "0.9.1", optional = true, default-features = false, features = [] }
rcgen = { version = "0.13.1", features = ["pem", "ring"], default-features = false, optional = true }
testcontainers = { version = "0.23.0" }


Expand Down Expand Up @@ -98,17 +100,11 @@ tar = "0.4.40"
testcontainers = { version = "0.23.0", features = ["blocking"] }
# To use Tiberius on macOS, rustls is needed instead of native-tls
# https://github.com/prisma/tiberius/tree/v0.12.2#encryption-tlsssl
tiberius = { version = "0.12.2", default-features = false, features = [
"tds73",
"rustls",
] }
tiberius = { version = "0.12.2", default-features = false, features = ["tds73", "rustls"] }
tokio = { version = "1", features = ["macros"] }
tokio-util = { version = "0.7.10", features = ["compat"] }
zookeeper-client = { version = "0.8.0" }
kube = { version = "0.90.0", default-features = false, features = [
"client",
"rustls-tls",
] }
kube = { version = "0.90.0", default-features = false, features = ["client", "rustls-tls"] }
k8s-openapi = { version = "0.21.1", features = ["v1_29"] }
clickhouse = "0.11.6"
vaultrs = "0.7.2"
Expand Down
77 changes: 77 additions & 0 deletions src/gitea/app.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
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

[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
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE3Mjc5Nzg5OTN9.-dbNWQlhx6rc-Xnxwl_DZmiZ6IHqpvswoPvIobIFIic

[lfs]
PATH = /var/lib/gitea/git/lfs

[mailer]
ENABLED = false

[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false

[cron.update_checker]
ENABLED = false

[repository.pull-request]
DEFAULT_MERGE_STYLE = merge

[repository.signing]
DEFAULT_TRUST_MODEL = committer

[oauth2]
JWT_SECRET = M-pyyTUNNwHtdfbz-1NjpAusE8ChiZtBkurxvradaBM

[server]
APP_DATA_PATH = /var/lib/gitea
HTTP_PORT = 3000
DISABLE_SSH = false
START_SSH_SERVER = true
SSH_PORT = 22
SSH_LISTEN_PORT = 2222
BUILTIN_SSH_SERVER_USER = git
LFS_START_SERVER = false
OFFLINE_MODE = true
Loading

0 comments on commit f7999eb

Please sign in to comment.