88 lines
1.9 KiB
HCL
88 lines
1.9 KiB
HCL
job "drone" {
|
|
datacenters = [
|
|
"nummer5",
|
|
]
|
|
type = "service"
|
|
node_pool = "apps"
|
|
priority = 30
|
|
|
|
group "apps" {
|
|
count = 1
|
|
|
|
network {
|
|
mode = "host"
|
|
port "http" {
|
|
to = 80
|
|
}
|
|
|
|
}
|
|
|
|
service {
|
|
name = "drone"
|
|
port = "http"
|
|
|
|
tags = [
|
|
"traefik.enable=true",
|
|
"traefik.http.routers.drone.rule=Host(`drone.service.nr5`)",
|
|
]
|
|
|
|
check {
|
|
type = "http"
|
|
path = "/welcome"
|
|
interval = "120s"
|
|
timeout = "5s"
|
|
}
|
|
}
|
|
|
|
volume "drone-data" {
|
|
type = "csi"
|
|
source = "drone-data"
|
|
read_only = false
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
restart {
|
|
attempts = 5
|
|
delay = "30s"
|
|
}
|
|
|
|
task "drone" {
|
|
driver = "podman"
|
|
volume_mount {
|
|
volume = "drone-data"
|
|
destination = "/data"
|
|
read_only = false
|
|
}
|
|
|
|
config {
|
|
image = "docker.io/drone/drone:latest"
|
|
force_pull = true
|
|
ports = ["http"]
|
|
}
|
|
|
|
env {
|
|
TZ = "Europe/Berlin"
|
|
DRONE_GIT_ALWAYS_AUTH = true
|
|
DRONE_GITEA_SERVER = "http://gitea.service.nr5"
|
|
DRONE_GITEA_CLIENT_ID = "6c48da2c-2748-438e-b776-51f41d3fe607"
|
|
DRONE_GITEA_CLIENT_SECRET = "gto_shthxcqiqutd4f3quejnpefgbedaewfqnnkdi3cfmsdoxjq7qfsq"
|
|
DRONE_RPC_SECRET = "7eb685ed81d0c34bafc5efa7783c20b2"
|
|
DRONE_SERVER_HOST = "drone.service.nr5"
|
|
DRONE_SERVER_PROTO = "http"
|
|
DRONE_JSONNET_ENABLED = true
|
|
DRONE_STARLARK_ENABLED = true
|
|
DRONE_LOGS_DEBUG = true
|
|
DRONE_LOGS_TRACE = true
|
|
DRONE_USER_CREATE = "username:do,admin:true"
|
|
}
|
|
|
|
resources {
|
|
cpu = 100
|
|
memory = 128
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|