Add volume to nomad template
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
5903ce9c56
commit
0184cf9c67
@ -26,10 +26,10 @@ blobs:
|
|||||||
ids:
|
ids:
|
||||||
- archive
|
- archive
|
||||||
folder: "/"
|
folder: "/"
|
||||||
release:
|
#release:
|
||||||
gitea:
|
# gitea:
|
||||||
owner: Elara6331
|
# owner: Elara6331
|
||||||
name: lure-updater
|
# name: lure-updater
|
||||||
gitea_urls:
|
gitea_urls:
|
||||||
api: 'https://gitea.elara.ws/api/v1/'
|
api: 'https://gitea.elara.ws/api/v1/'
|
||||||
download: 'https://gitea.elara.ws'
|
download: 'https://gitea.elara.ws'
|
||||||
|
@ -3,16 +3,28 @@ job "lure-updater" {
|
|||||||
datacenters = ["dc1"]
|
datacenters = ["dc1"]
|
||||||
type = "service"
|
type = "service"
|
||||||
|
|
||||||
group "site" {
|
group "lure-updater" {
|
||||||
network {
|
network {
|
||||||
port "webhook" {
|
port "webhook" {
|
||||||
to = 8080
|
to = 8080
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
volume "lure-updater-data" {
|
||||||
|
type = "host"
|
||||||
|
source = "lure-updater-data"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
task "lure-updater" {
|
task "lure-updater" {
|
||||||
driver = "docker"
|
driver = "docker"
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "lure-updater-data"
|
||||||
|
destination = "/etc/lure-updater"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
env {
|
env {
|
||||||
GIT_REPO_DIR="/etc/lure-updater/repo"
|
GIT_REPO_DIR="/etc/lure-updater/repo"
|
||||||
GIT_REPO_URL="https://github.com/Elara6331/lure-repo.git"
|
GIT_REPO_URL="https://github.com/Elara6331/lure-repo.git"
|
||||||
@ -30,14 +42,14 @@ job "lure-updater" {
|
|||||||
config {
|
config {
|
||||||
image = "alpine:latest"
|
image = "alpine:latest"
|
||||||
ports = ["webhook"]
|
ports = ["webhook"]
|
||||||
volumes = ["local/:/opt/lure-updater:ro"]
|
volumes = ["local/lure-updater/:/opt/lure-updater:ro"]
|
||||||
command = "/opt/lure-updater/lure-updater"
|
command = "/opt/lure-updater/lure-updater"
|
||||||
args = ["-E"]
|
args = ["-E"]
|
||||||
}
|
}
|
||||||
|
|
||||||
artifact {
|
artifact {
|
||||||
source = "https://api.minio.elara.ws/site/site.tar.gz"
|
source = "https://api.minio.elara.ws/lure-updater/lure-updater-$${attr.cpu.arch}.tar.gz"
|
||||||
destination = "local/site"
|
destination = "local/lure-updater"
|
||||||
}
|
}
|
||||||
|
|
||||||
service {
|
service {
|
||||||
@ -46,8 +58,8 @@ job "lure-updater" {
|
|||||||
|
|
||||||
tags = [
|
tags = [
|
||||||
"traefik.enable=true",
|
"traefik.enable=true",
|
||||||
"traefik.http.routers.site.rule=Host(`updater.lure.elara.ws`)",
|
"traefik.http.routers.lure-updater.rule=Host(`updater.lure.elara.ws`)",
|
||||||
"traefik.http.routers.site.tls.certResolver=letsencrypt",
|
"traefik.http.routers.lure-updater.tls.certResolver=letsencrypt",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user