It seems that the volume configuration for Traefik logs might not be working. Could you please provide guidance on troubleshooting this issue?
job "traefik" {
region = "global"
namespace = "default"
datacenters = ["dcpreprod"]
type = "service"
id = "traefik"
node_pool = "default"
group "traefik" {
count = 2
network {
port "http" {
static = 5645
}
port "api" {
static = 5646
}
dns {
servers = ["192.168.5.181"]
}
}
service {
name = "traefik"
check {
name = "alive"
type = "tcp"
port = "http"
interval = "10s"
timeout = "2s"
}
}
task "traefik" {
driver = "docker"
config {
image = "192.168.0.1:5000/traefik"
network_mode = "host"
volumes = [
"local/traefik.toml:/etc/traefik/traefik.toml",
#"/var/log/traefik:/var/log/traefik",
]
}
template {
data = <<EOF
[entryPoints]
[entryPoints.http]
address = ":5645"
[entryPoints.traefik]
address = ":5646"
[api]
dashboard = true
insecure = true
# Enable Consul Catalog configuration backend.
[providers.consulCatalog]
prefix = "traefik"
exposedByDefault = false
[providers.consulCatalog.endpoint]
address = "127.0.0.1:8500"
scheme = "http"
#accessLog:
# filePath: /var/log/traefik/access.log
# format: json
# fields:
# defaultMode: keep
# headers:
# defaultMode: keep
# names:
# User-Agent: keep
# X-Request-Id: keep
# X-Real-Ip: keep
# X-Key: redact
# Authorization: redact
EOF
destination = "local/traefik.toml"
}
resources {
cpu = 100
memory = 128
}
}
}
}
docker --version
Docker version 26.0.0, build 2ae903e
nomad --version
Nomad v1.7.6