installers.infra.gitea #
fn get #
fn get(name_ string) !Server
fn install #
fn install() !
fn new #
fn new(args_ Config) !Server
get the gitea server
name string = 'default'
path string = '/data/gitea'
passwd string
if name exists already in the config DB, it will load for that name
fn start #
fn start() !
struct Config #
@[params]
struct Config {
pub mut:
name string = 'default'
reset bool
path string = '/data/gitea'
passwd string
postgresql_name string = 'default'
mail_from string = 'git@meet.tf'
smtp_addr string = 'smtp-relay.brevo.com'
smtp_login string @[required]
smpt_port int = 587
smtp_passwd string
domain string @[required]
jwt_secret string
lfs_jwt_secret string
internal_token string
secret_key string
}
struct Server #
struct Server {
pub mut:
name string
config Config
process ?zinit.ZProcess
path_config pathlib.Path
}
fn (Server) status #
fn (mut server Server) status() zinit.ZProcessStatus
return status
pub enum ZProcessStatus {
unknown
init
ok
error
blocked
spawned
}
fn (Server) start #
fn (mut server Server) start() !
run gitea as docker compose
fn (Server) restart #
fn (mut server Server) restart() !
fn (Server) stop #
fn (mut server Server) stop() !
fn (Server) check #
fn (mut server Server) check() !
check health, return true if ok
fn (Server) ok #
fn (mut server Server) ok() bool
check health, return true if ok
fn (Server) destroy #
fn (mut server Server) destroy() !
remove all data