2022-11-19 23:46:36 +00:00
|
|
|
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"
|
2023-07-30 04:32:34 +00:00
|
|
|
WOODPECKER_HOST = "https://ci.elara.ws"
|
2022-11-19 23:46:36 +00:00
|
|
|
WOODPECKER_GITEA = "true"
|
2023-07-30 04:32:34 +00:00
|
|
|
WOODPECKER_GITEA_URL = "https://gitea.elara.ws"
|
2022-11-19 23:46:36 +00:00
|
|
|
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",
|
2023-07-30 04:32:34 +00:00
|
|
|
"traefik.http.routers.woodpecker-ci.rule=Host(`ci.elara.ws`)",
|
2022-11-19 23:46:36 +00:00
|
|
|
"traefik.http.routers.woodpecker-ci.tls.certResolver=letsencrypt"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|