Add gitea
This commit is contained in:
@@ -58,4 +58,53 @@ resource "nomad_csi_volume_registration" "unraid_appdata_transferfilebrowser" {
|
||||
}
|
||||
}
|
||||
|
||||
resource "nomad_job" "gitea" {
|
||||
jobspec = file("gitea.nomad.hcl")
|
||||
}
|
||||
|
||||
resource "nomad_variable" "gitea" {
|
||||
path = "nomad/jobs/gitea"
|
||||
items = {
|
||||
internal_token = data.sops_file.secrets.data["gitea.internal_token"]
|
||||
jwt_secret = data.sops_file.secrets.data["gitea.jwt_secret"]
|
||||
}
|
||||
}
|
||||
|
||||
resource "postgresql_role" "gitea" {
|
||||
name = "gitea"
|
||||
password = "gitea"
|
||||
login = true
|
||||
}
|
||||
|
||||
resource "postgresql_database" "gitea" {
|
||||
name = "gitea"
|
||||
owner = postgresql_role.gitea.name
|
||||
}
|
||||
|
||||
resource "nomad_csi_volume_registration" "unraid_appdata_gitea" {
|
||||
#Note: Before chaning the definition of this volume you need to stop the jobs that are using it
|
||||
depends_on = [data.nomad_plugin.smb]
|
||||
plugin_id = "smb"
|
||||
|
||||
volume_id = "unraid_appdata_gitea"
|
||||
name = "unraid_appdata_gitea"
|
||||
|
||||
external_id = "unraid_appdata_gitea"
|
||||
|
||||
capability {
|
||||
access_mode = "single-node-writer"
|
||||
attachment_mode = "file-system"
|
||||
}
|
||||
|
||||
context = {
|
||||
source = "//192.168.1.192/appdata"
|
||||
subDir = "gitea" # Note: Needs to be manually created on the share
|
||||
}
|
||||
|
||||
secrets = {
|
||||
"username" = "nomad"
|
||||
"password" = data.sops_file.secrets.data["unraid.nomad"]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user