This repository has been archived on 2023-03-15. You can view files and clone it, but cannot push or open issues or pull requests.
infrastructure/app/core/deploy/core.hcl

52 lines
926 B
HCL
Raw Normal View History

2020-05-23 14:50:30 +00:00
job "core" {
2021-12-08 10:41:07 +00:00
datacenters = ["dc1", "neptune"]
type = "system"
priority = 90
2020-05-23 14:50:30 +00:00
2021-12-08 10:41:07 +00:00
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
2020-05-23 14:50:30 +00:00
2021-12-08 10:41:07 +00:00
update {
max_parallel = 1
stagger = "1m"
}
2020-05-23 14:50:30 +00:00
2021-12-08 10:41:07 +00:00
group "network" {
task "diplonat" {
driver = "docker"
2020-05-23 14:50:30 +00:00
2021-12-08 10:41:07 +00:00
config {
image = "darkgallium/amd64_diplonat:v3"
network_mode = "host"
readonly_rootfs = true
privileged = true
}
2020-05-23 14:50:30 +00:00
2021-12-08 10:41:07 +00:00
restart {
interval = "30m"
attempts = 2
delay = "15s"
mode = "delay"
}
2021-12-08 10:41:07 +00:00
template {
data = <<EOH
2020-05-23 14:50:30 +00:00
DIPLONAT_PRIVATE_IP={{ env "attr.unique.network.ip-address" }}
DIPLONAT_REFRESH_TIME=60
DIPLONAT_EXPIRATION_TIME=300
DIPLONAT_CONSUL_NODE_NAME={{ env "attr.unique.hostname" }}
RUST_LOG=debug
EOH
2021-12-08 10:41:07 +00:00
destination = "secrets/env"
env = true
}
2020-05-23 14:50:30 +00:00
2021-12-08 10:41:07 +00:00
resources {
memory = 40
}
}
}
2020-05-23 14:50:30 +00:00
}