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
831 B
HCL
Raw Normal View History

2020-05-23 14:50:30 +00:00
job "core" {
datacenters = ["dc1"]
type = "system"
priority = 90
2020-05-23 14:50:30 +00:00
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
2020-05-23 14:50:30 +00:00
update {
max_parallel = 1
stagger = "1m"
}
2020-05-23 14:50:30 +00:00
group "network" {
task "diplonat" {
driver = "docker"
2020-05-23 14:50:30 +00:00
config {
2021-08-19 09:33:36 +00:00
image = "darkgallium/amd64_diplonat:v3"
network_mode = "host"
readonly_rootfs = true
privileged = true
}
2020-05-23 14:50:30 +00:00
restart {
interval = "30m"
attempts = 2
delay = "15s"
mode = "delay"
}
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
destination = "secrets/env"
env = true
}
2020-05-23 14:50:30 +00:00
resources {
memory = 40
}
}
}
2020-05-23 14:50:30 +00:00
}