: install/configure gitea

This commit is contained in:
VC
2025-01-29 12:05:43 +01:00
parent b3b234033d
commit 008d4411ad
10 changed files with 264 additions and 0 deletions

View File

@@ -0,0 +1,82 @@
APP_NAME = Gitea: Git with a cup of tea
RUN_USER = git
WORK_PATH = /srv/gitea
RUN_MODE = prod
[database]
DB_TYPE = postgres
HOST = 127.0.0.1:5432
NAME = giteadb
USER = gitea
PASSWD = {{ gitea_database_passwd }}
SCHEMA =
SSL_MODE = disable
PATH = /srv/gitea/data/gitea.db
LOG_SQL = false
[repository]
ROOT = /srv/gitea/data/gitea-repositories
[server]
SSH_DOMAIN = giteu.be
DOMAIN = giteu.be
HTTP_PORT = 3000
ROOT_URL = https://giteu.be/
APP_DATA_PATH = /srv/gitea/data
DISABLE_SSH = false
SSH_PORT = 22
LFS_START_SERVER = true
LFS_JWT_SECRET = {{ gitea_server_lfs_jwt_secret }}
OFFLINE_MODE = true
[lfs]
PATH = /srv/gitea/data/lfs
[mailer]
ENABLED = true
SMTP_ADDR = smtp.libertus.eu
SMTP_PORT = 587
FROM = Gitea <gitea@mateu.be>
USER = {{ smtprelay_login }}
PASSWD = {{ smtprelay_pass }}
[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = false
DISABLE_REGISTRATION = true
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false
DEFAULT_KEEP_EMAIL_PRIVATE = true
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = noreply.localhost
[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false
[cron.update_checker]
ENABLED = false
[session]
PROVIDER = file
[log]
MODE = console
LEVEL = info
ROOT_PATH = /srv/gitea/log
[repository.pull-request]
DEFAULT_MERGE_STYLE = merge
[repository.signing]
DEFAULT_TRUST_MODEL = committer
[security]
INSTALL_LOCK = true
INTERNAL_TOKEN = {{ gitea_security_internal_token }}
PASSWORD_HASH_ALGO = pbkdf2
[oauth2]
JWT_SECRET = {{ gitea_oauth2_jwt_secret }}

View File

@@ -0,0 +1,23 @@
[Unit]
Description=Gitea (Git with a cup of tea)
After=network.target
Wants=postgresql.service
After=postgresql.service
[Service]
# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
# LimitNOFILE=524288:524288
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory={{ gitea_path }}
# If using Unix socket: tells systemd to create the /run/gitea folder, which will contain the gitea.sock file
# (manually creating /run/gitea doesn't work, because it would not persist across reboots)
#RuntimeDirectory=gitea
ExecStart={{ gitea_bin }} web --config {{ gitea_etc_path }}/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR={{ gitea_path }}
[Install]
WantedBy=multi-user.target