Thingvellir as nomad server

This commit is contained in:
marc
2024-02-16 18:21:24 +01:00
parent 3c23709394
commit 87a4d79c71
27 changed files with 1253 additions and 18 deletions

71
data/nomad/gitea.nomad Normal file
View File

@@ -0,0 +1,71 @@
job "gitea" {
region = "global"
datacenters = ["samfelag"]
type = "service"
group "gitea" {
count = 1
restart {
attempts = 5
delay = "1m"
}
network {
port "http" {
to = 3000
}
port "ssh" {
static = 2222
to = 22
host_network = "public"
}
}
task "gitea" {
driver = "docker"
env {
USER_UID = "1001"
USER_GID = "1001"
}
config {
image = "gitea/gitea:latest"
ports = ["http", "ssh"]
volumes = ["/mnt/vatnajokull/nomad_volumes/gitea/data:/data"]
}
resources {
cpu = 1000
memory = 256
}
service {
name = "gitea"
port = "http"
check {
type = "tcp"
port = "http"
interval = "30s"
timeout = "2s"
}
}
service {
name = "gitea-ssh"
port = "ssh"
check {
type = "tcp"
port = "ssh"
interval = "30s"
timeout = "2s"
}
}
}
}
}