Skip to content

Commit

Permalink
Disable csi on test server
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 committed Oct 5, 2024
1 parent 2adac23 commit 80201b4
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions jobs/http.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,30 @@ job "http" {
datacenters = ["dc1"]

group "http" {
volume "caddycerts" {
type = "csi"
source = "caddycerts"
read_only = false
access_mode = "single-node-writer"
attachment_mode = "file-system"
dynamic "volume" {
for_each = local.main ? [{}] : []
labels = ["caddycerts"]
content {
type = "csi"
source = "caddycerts"
read_only = false
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
}

task "http" {
driver = "docker"

volume_mount {
volume = "caddycerts"
destination = "/etc/caddycerts"
read_only = false
dynamic "volume_mount" {
for_each = local.main ? [{}] : []
content {
volume = "caddycerts"
destination = "/etc/caddycerts"
read_only = false
}
}

dynamic "artifact" {
for_each = local.main ? [{}] : []

Expand All @@ -44,7 +52,7 @@ job "http" {

content {
data = var.caddyfile_for_test
destination = "local.Caddyfile"
destination = "local/Caddyfile"
}
}

Expand All @@ -61,7 +69,7 @@ job "http" {
command = "caddy"
args = ["run"]

network_mode = "host"
network_mode = local.main ? "host" : "bridge"

volumes = [
"local/Caddyfile:/srv/femiwiki.com/Caddyfile",
Expand Down

0 comments on commit 80201b4

Please sign in to comment.