Add woodpecker agent job file

This commit is contained in:
Elara 2022-11-19 23:47:38 +00:00
parent 065f9883ff
commit b411d9bfc0

View File

@ -0,0 +1,33 @@
job "woodpecker-agent" {
region = "global"
datacenters = ["dc1"]
type = "system"
group "woodpecker-agent" {
restart {
attempts = 5
delay = "30s"
}
task "woodpecker-agent" {
driver = "docker"
config {
image = "woodpeckerci/woodpecker-agent:latest"
volumes = [
"/var/run/docker.sock:/var/run/docker.sock",
]
}
env {
WOODPECKER_SERVER = "192.168.100.121:9000"
WOODPECKER_AGENT_SECRET = "CHANGE ME"
}
constraint {
attribute = "${meta.woodpecker_agent}"
value = "true"
}
}
}
}