weewx configuration
This commit is contained in:
66
services/weewx.hcl
Normal file
66
services/weewx.hcl
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
job "weewx" {
|
||||||
|
datacenters = ["alo"]
|
||||||
|
|
||||||
|
meta {
|
||||||
|
uuid = uuidv4()
|
||||||
|
}
|
||||||
|
|
||||||
|
group "weather" {
|
||||||
|
network {
|
||||||
|
port "http" {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task "backend" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "gitea.v.paler.net/ppetru/weewx:latest"
|
||||||
|
volumes = [
|
||||||
|
"/data/compute/appdata/weewx/etc:/etc/weewx",
|
||||||
|
"/data/compute/appdata/weewx/html:/var/www/html",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
# needed for running weectl report run inside the container
|
||||||
|
#memory = 1024
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task "frontend" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "pierrezemb/gostatic"
|
||||||
|
|
||||||
|
ports = [ "http" ]
|
||||||
|
|
||||||
|
args = [
|
||||||
|
"-port=${NOMAD_PORT_http}",
|
||||||
|
"-enable-health",
|
||||||
|
]
|
||||||
|
|
||||||
|
volumes = [ "/data/compute/appdata/weewx/html:/srv/http" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "weather"
|
||||||
|
port = "http"
|
||||||
|
|
||||||
|
tags = [
|
||||||
|
"traefik.enable=true",
|
||||||
|
"traefik.http.routers.weather.entryPoints=websecure",
|
||||||
|
"traefik.http.routers.weather.rule=Host(`weewx.v.paler.net`) || (Host(`alo.land`) && PathPrefix(`/weather/`))",
|
||||||
|
]
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "http"
|
||||||
|
path = "/health"
|
||||||
|
interval = "10s"
|
||||||
|
timeout = "2s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user