Set up Forgejo role and migrate Gitea to Forgejo 11
This commit is contained in:
parent
1c9721f0b2
commit
300358fa98
10 changed files with 319 additions and 19 deletions
126
roles/any.software.forgejo-podman/templates/app.ini.j2
Normal file
126
roles/any.software.forgejo-podman/templates/app.ini.j2
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
APP_NAME = The Rusty Bever
|
||||
RUN_MODE = prod
|
||||
RUN_USER = git
|
||||
WORK_PATH = /data/gitea
|
||||
|
||||
[repository]
|
||||
ROOT = /data/git/repositories
|
||||
; Makes public the default option when creating a repo
|
||||
DEFAULT_PRIVATE = public
|
||||
; Disables releases, projects & wiki by default for new repos (but can be enabled when needed)
|
||||
DEFAULT_REPO_UNITS = repo.code,repo.issues,repo.pulls
|
||||
; Might as well be compatible with
|
||||
DEFAULT_BRANCH = main
|
||||
|
||||
[repository.pull-request]
|
||||
WORK_IN_PROGRESS_PREFIXES = WIP:,[WIP]:,Draft:,[Draft]:
|
||||
|
||||
[repository.local]
|
||||
LOCAL_COPY_PATH = /data/gitea/tmp/local-repo
|
||||
|
||||
[repository.upload]
|
||||
TEMP_PATH = /data/gitea/uploads
|
||||
|
||||
[ui]
|
||||
; Always show the full name of a user when possible
|
||||
DEFAULT_SHOW_FULL_NAME = true
|
||||
THEMES = auto,gitea,arc-green,gitea-modern
|
||||
|
||||
[server]
|
||||
APP_DATA_PATH = /data/gitea
|
||||
DOMAIN = {{ forgejo_domain }}
|
||||
SSH_DOMAIN = {{ forgejo_ssh_domain | default(forgejo_domain) }}
|
||||
HTTP_PORT = 3000
|
||||
ROOT_URL = {{ forgejo_root_url }}
|
||||
DISABLE_SSH = false
|
||||
SSH_PORT = 22
|
||||
SSH_LISTEN_PORT = 22
|
||||
LFS_START_SERVER = true
|
||||
OFFLINE_MODE = false
|
||||
LFS_JWT_SECRET = {{ forgejo_lfs_jwt_secret }}
|
||||
|
||||
[lfs]
|
||||
PATH = /data/git/lfs
|
||||
|
||||
[database]
|
||||
PATH = /data/gitea/gitea.db
|
||||
DB_TYPE = postgres
|
||||
HOST = localhost:5432
|
||||
NAME = gitea
|
||||
USER = gitea
|
||||
PASSWD = gitea
|
||||
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
|
||||
ROOT_PATH = /data/gitea/log
|
||||
|
||||
; disable router logs
|
||||
logger.router.MODE =
|
||||
|
||||
[log.console]
|
||||
MODE = console
|
||||
FLAGS = journaldflags
|
||||
COLORIZE = false
|
||||
|
||||
[security]
|
||||
INSTALL_LOCK = true
|
||||
MIN_PASSWORD_LENGTH = 12
|
||||
PASSWORD_COMPLEXITY = lower,upper,digit
|
||||
SECRET_KEY = {{ forgejo_secret_key }}
|
||||
INTERNAL_TOKEN = {{ forgejo_internal_token }}
|
||||
|
||||
[service]
|
||||
DISABLE_REGISTRATION = true
|
||||
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
|
||||
|
||||
[mailer]
|
||||
ENABLED = false
|
||||
|
||||
[openid]
|
||||
ENABLE_OPENID_SIGNIN = true
|
||||
ENABLE_OPENID_SIGNUP = false
|
||||
|
||||
[oauth2]
|
||||
JWT_SECRET = {{ forgejo_jwt_secret }}
|
||||
|
||||
[other]
|
||||
SHOW_FOOTER_VERSION = false
|
||||
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false
|
||||
|
||||
[cron.delete_repo_archives]
|
||||
ENABLED = true
|
||||
SCHEDULE = @weekly
|
||||
|
||||
[metrics]
|
||||
enabled = true
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
# vim: ft=systemd
|
||||
[Unit]
|
||||
Requires=forgejo-postgres.service
|
||||
After=forgejo-postgres.service
|
||||
|
||||
[Container]
|
||||
Image=codeberg.org/forgejo/forgejo:{{ forgejo_version }}
|
||||
Pod=forgejo.pod
|
||||
|
||||
Volume={{ forgejo_data_dir }}:/data
|
||||
Volume={{ forgejo_repositories_dir }}:/data/git/repositories
|
||||
Volume={{ forgejo_lfs_dir }}:/data/git/lfs
|
||||
Volume=/etc/localtime:/etc/localtime:ro
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# vim: ft=systemd
|
||||
[Container]
|
||||
Image=docker.io/postgres:{{ forgejo_postgres_version }}-alpine
|
||||
Pod=forgejo.pod
|
||||
|
||||
Environment=POSTGRES_USER=gitea POSTGRES_PASSWORD=gitea POSTGRES_DB=gitea
|
||||
|
||||
HealthCmd=["pg_isready","-U","gitea"]
|
||||
HealthInterval=30s
|
||||
HealthRetries=3
|
||||
HealthStartPeriod=30s
|
||||
HealthTimeout=5s
|
||||
Notify=Healthy
|
||||
|
||||
Volume={{ forgejo_postgres_dir }}:/var/lib/postgresql/data
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{{ forgejo_domain }} {
|
||||
reverse_proxy localhost:{{ forgejo_http_port }} {
|
||||
header_down +X-Robots-Tag "none"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
# vim: ft=systemd
|
||||
[Pod]
|
||||
{% if forgejo_ssh_port is defined %}
|
||||
PublishPort={{ forgejo_ssh_port }}:22
|
||||
{% endif %}
|
||||
{% if forgejo_http_port is defined %}
|
||||
PublishPort={{ forgejo_http_port }}:3000
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue