job "core-tricot" { # bespin pas pour l'instant, on a des soucis de SSL avec gitea # on pourra mettre bespin quand on aura migré gitea de la vm vers le cluster # en attendant, les deux ne sont pas capables de partager les certificats SSL # donc on laisse la VM gitea gérer les certifs et prendre tout le trafic http(s) datacenters = ["neptune", "scorpio"] type = "system" priority = 90 update { max_parallel = 1 stagger = "5m" } group "tricot" { constraint { distinct_property = "${meta.site}" value = "1" } network { port "http_port" { static = 80 } port "https_port" { static = 443 } port "metrics_port" { static = 9334 } } task "server" { driver = "docker" config { image = "superboum/amd64_tricot:54" network_mode = "host" readonly_rootfs = true ports = [ "http_port", "https_port" ] volumes = [ "secrets:/etc/tricot", ] } resources { cpu = 1000 memory = 200 memory_max = 500 } restart { interval = "5m" attempts = 10 delay = "15s" mode = "delay" } template { data = "{{ key \"secrets/consul/consul-ca.crt\" }}" destination = "secrets/consul-ca.crt" } template { data = "{{ key \"secrets/consul/consul-client.crt\" }}" destination = "secrets/consul-client.crt" } template { data = "{{ key \"secrets/consul/consul-client.key\" }}" destination = "secrets/consul-client.key" } template { data = <