Add woodpecker job file

This commit is contained in:
Elara 2022-11-19 23:46:36 +00:00
parent dddb37e979
commit 065f9883ff
1 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,66 @@
job "woodpecker" {
region = "global"
datacenters = ["dc1"]
type = "service"
group "woodpecker" {
count = 1
network {
port "agent" {
to = 9000
static = 9000
}
port "http" {
to = 8000
}
}
volume "woodpecker" {
type = "host"
source = "woodpecker"
read_only = false
}
restart {
attempts = 5
delay = "30s"
}
task "woodpecker" {
driver = "docker"
volume_mount {
volume = "woodpecker"
destination = "/var/lib/woodpecker"
read_only = false
}
config {
image = "woodpeckerci/woodpecker-server:latest"
ports = ["agent", "http"]
}
env {
WOODPECKER_OPEN = "true"
WOODPECKER_HOST = "https://ci.arsenm.dev"
WOODPECKER_GITEA = "true"
WOODPECKER_GITEA_URL = "https://gitea.arsenm.dev"
WOODPECKER_GITEA_CLIENT = "CHANGE ME"
WOODPECKER_GITEA_SECRET = "CHANGE ME"
WOODPECKER_AGENT_SECRET = "CHANGE ME"
}
service {
name = "woodpecker-ci"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.woodpecker-ci.rule=Host(`ci.arsenm.dev`)",
"traefik.http.routers.woodpecker-ci.tls.certResolver=letsencrypt"
]
}
}
}
}