Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improved git lfs configuration on gitea configuration closes #65 #66

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ The following code has been tested with Debian 8, it should work on Ubuntu as we
* `gitea_mailer_password`: SMTP server password
* `gitea_mailer_from`: Sender mail address
* `gitea_enable_notify_mail`: Whether e-mail should be send to watchers of a repository when something happens. Default: `false`
* `gitea_mail_default`: Default configuration for email notifications for users (user configurable). Options: enabled, onmention, disable (Default: `onmention` )
* `gitea_autowatch_new_repo`: Enable this to let all organisation users watch new repos when they are created (Default: `false`)
* `gitea_autowatch_on_change`: Enable this to make users watch a repository after their first commit to it (Default: `true`)
* `gitea_show_mailstones_dashboard`: Enable this to show the milestones dashboard page - a view of all the user’s milestones (Default: `true`)

### Fail2Ban configuration

Expand All @@ -136,6 +140,9 @@ As this will only deploy config files, fail2ban already has to be installed or o
* `gitea_oauth2_enabled`: Enable the Oauth2 provider (true/false)
* `gitea_oauth2_jwt_secret`: JWT secret, cannot be longer than 32 characters

### GIT LFS configuration
* `gitea_lfs_enabled`: Enable GIT LFS (large filesystem)
* `gitea_lfs_mode`: should lfs be in offline mode (true/false)

### Metrics endpoint configuration

Expand Down
6 changes: 6 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ gitea_offline_mode: true

gitea_lfs_server_enabled: false
gitea_lfs_content_path: "data/lfs"
gitea_lfs_secret: SomethingVeryLong
TheRojam marked this conversation as resolved.
Show resolved Hide resolved
gitea_lfs_mode: true

gitea_db_type: sqlite3
gitea_db_host: 127.0.0.0:3306
Expand All @@ -47,6 +49,10 @@ gitea_require_signin: true
gitea_enable_captcha: true
gitea_only_allow_external_registration: false
gitea_enable_notify_mail: false
gitea_mail_default: onmention
gitea_autowatch_new_repo: false
gitea_autowatch_on_change: true
gitea_show_mailstones_dashboard: true

gitea_force_private: false

Expand Down
9 changes: 8 additions & 1 deletion templates/gitea.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ APP_DATA_PATH = {{ gitea_home }}/data
LFS_START_SERVER = true
; Where to store LFS files.
LFS_CONTENT_PATH = {{ gitea_lfs_content_path }}
; if the LFS sotre is not offline/local
LFS_JWT_SECRET = {{ gitea_lfs_secret }}
TheRojam marked this conversation as resolved.
Show resolved Hide resolved
OFFLINE_MODE = {{ gitea_lfs_mode }}
{%- endif %}

[database]
; Either "mysql", "postgres", "mssql" or "sqlite3", it's your choice
DB_TYPE = {{ gitea_db_type }}
Expand Down Expand Up @@ -117,6 +119,11 @@ RECAPTCHA_SITEKEY =
SHOW_REGISTRATION_BUTTON = {{ gitea_show_registration_button }}
ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ gitea_only_allow_external_registration }}
ENABLE_NOTIFY_MAIL = {{ gitea_enable_notify_mail }}
DEFAULT_EMAIL_NOTIFICATIONS = {{ gitea_mail_default }}
AUTO_WATCH_NEW_REPOS = {{ gitea_autowatch_new_repo }}
AUTO_WATCH_ON_CHANGES = {{ gitea_autowatch_on_change }}
SHOW_MILESTONES_DASHBOARD_PAGE = {{ gitea_show_mailstones_dashboard }}

TheRojam marked this conversation as resolved.
Show resolved Hide resolved

[mailer]
ENABLED = {{ gitea_mailer_enabled }}
Expand Down