# GNUNUX https://codeberg.org/forgejo/forgejo/raw/branch/forgejo/custom/conf/app.example.ini
APP_NAME = %%forgejo_title
RUN_USER = forgejo
RUN_MODE = prod

[database]
DB_TYPE  = postgres
HOST     = %%pg_client_server_domainname:5432
NAME     = %%pg_client_database
USER     = %%pg_client_username
PASSWD   = %%pg_client_password
SCHEMA   =
SSL_MODE = verify-full
CHARSET  = utf8
LOG_SQL  = false

[repository]
ROOT = /srv/forgejo/lib/data/forgejo-repositories
DEFAULT_BRANCH = main

[server]
SSH_DOMAIN       = %%revprox_client_external_domainnames[0]
DOMAIN           = %%revprox_client_external_domainnames[0]
HTTP_PORT        = 3000
ROOT_URL         = https://%%revprox_client_external_domainnames[0]%%revprox_client_external_domainnames[0]revprox_client_location
LOCAL_ROOT_URL   = https://%%domain_name_eth0:3000/
DISABLE_SSH      = false
START_SSH_SERVER = true
SSH_LISTEN_PORT  = 2222
SSH_PORT         = 2222
LFS_START_SERVER = true
LFS_JWT_SECRET   = %%forgejo_lfs_jwt_secret
OFFLINE_MODE     = true
PROTOCOL         = https
CERT_FILE        = %%revprox_client_cert_file
KEY_FILE         = %%revprox_client_key_file

[lfs]
PATH = /srv/forgejo/lib/data/lfs

[mailer]
ENABLED   = true
SMTP_ADDR = %%smtp_relay_address
SMTP_PORT = 25
FROM      = %%forgejo_mail_sender
USER      = %%smtp_relay_user@%%ip_eth0
PASSWD    = %%smtp_relay_password
PROTOCOL  = smtp+starttls
;USE_CERTIFICATE = false
;CERT_FILE = custom/mailer/cert.pem
;KEY_FILE = custom/mailer/key.pem

[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        = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING       = true
NO_REPLY_ADDRESS                  = noreply.localhost

[picture]
DISABLE_GRAVATAR        = true
ENABLE_FEDERATED_AVATAR = false

[openid]
ENABLE_OPENID_SIGNIN = true
ENABLE_OPENID_SIGNUP = true

[oauth2_client]
ENABLE_AUTO_REGISTRATION = true

[session]
PROVIDER = redis
PROVIDER_CONFIG = network=tcp,addr=%%redis_client_server_domainname:6379,password=%%redis_client_password,db=0,pool_size=100,idle_timeout=180

[cache]
;; if the cache enabled
NABLED = true
;;
;; Either "memory", "redis", "memcache", or "twoqueue". default is "memory"
ADAPTER = redis
;;
;; For "memory" only, GC interval in seconds, default is 60
;INTERVAL = 60
;;
;; For "redis" and "memcache", connection host address
;; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
;; memcache: `127.0.0.1:11211`
;; twoqueue: `{"size":50000,"recent_ratio":0.25,"ghost_ratio":0.5}` or `50000`
HOST = network=tcp,addr=%%redis_client_server_domainname:6379,username=%%redis_client_username,password=%%redis_client_password,db=0,pool_size=100,idle_timeout=180
;;
;; Time to keep items in cache if not used, default is 16 hours.
;; Setting it to 0 disables caching
;ITEM_TTL = 16h

[log]
MODE      = console
LEVEL     = info
ROOT_PATH = /srv/forgejo/lib/log
ROUTER    = console

[security]
INSTALL_LOCK       = true
SECRET_KEY     = %%forgejo_secret_key
INTERNAL_TOKEN     = %%forgejo_internal_token
PASSWORD_HASH_ALGO = pbkdf2
