This module downloads a pre-built binary from the Gitea project releases
page. No external package repositories are required. You can choose to install
Gitea with default settings, or customize them using the
custom_configuration
class parameter.
The simplest use case is to rely on defaults, which will install the latest
tested version in /opt/gitea
.
include gitea
To install a version that has not been tested with this module, you must provide the release sha256 checksum:
class { 'gitea':
version => '1.17.0',
checksum => 'bc4a8e1f5d5f64d4be2e50c387de08d07c062aecdba2f742c2f61c20accfcc46',
}
To customize the Gitea configuration, use the custom_configuration
parameter
(merged with defaults in common.yaml).
Refer to Gitea's Config Cheat Sheet for most settings and defaults.
Each section in the cheat sheet is labeled by a human name and the
config section in parentheses. The config section is a top level key
of the custom_configuration
hash, except DEFAULT which is an empty string.
class { 'gitea':
custom_configuration => {
'' => {
'APP_NAME' => 'Internal Code Projects',
},
'server' => {
'ROOT_URL' => 'https://example.com/git/',
},
'ui' => {
'SHOW_USER_EMAIL' => 'false',
'MAX_DISPLAY_FILE_SIZE' => '4194304',
},
'ui.meta' => {
'DESCRIPTION' => 'My self-hosted code project service',
'KEYWORDS' => 'git,self-hosted',
},
'indexer' => {
'REPO_INDEXER_ENABLED' => true,
},
'cache' => {
'ADAPTER' => 'redis',
'HOST' => 'network=tcp,addr=127.0.0.1:6379,db=0,pool_size=100,idle_timeout=180',
},
'session' => {
'PROVIDER' => 'redis',
'PROVIDER_CONFIG' => 'network=tcp,addr=127.0.0.1:6379,db=0,pool_size=100,idle_timeout=180',
},
}
}
Custom files allow you to add themes, override built-in templates, or serve additional files.
Use the gitea::custom::file
resource to manage files in Gitea's custom
directory. Subdirectories are automatically created for you.
gitea::custom::file { 'public/assets/css/custom.css':
content => file('profile/gitea/custom.css'),
}
gitea::custom::file { 'public/assets/img/logo.svg':
source => 'puppet:///modules/profile/gitea/logo.svg',
}
When submitting pull requests, please make sure that the module documentation, test cases, and syntax checks pass.
Use the PDK to validate and execute unit tests:
pdk validate
pdk test unit
Use the PDK to execute acceptance tests (requires docker):
pdk bundle exec rake acceptance
Use the PDK to update the reference documentation.
pdk bundle exec rake strings:generate:reference
This module was forked from kogitoapp/gitea and is NOT compatible.