aboutsummaryrefslogtreecommitdiff
path: root/cluster/prod/app/guichet/deploy/directory.hcl
blob: 397602f6ef3fd573092aa16884cf87250e5d9e14 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
job "guichet" {
  datacenters = [ "neptune", "scorpio" ]
  type = "service"
  priority = 90

  group "guichet" {
    count = 1

    network {
      port "web_port" { to = 9991 }
    }

    task "guichet" {
      driver = "docker"
      config {
        image = "dxflrs/guichet:m1gzk1r00xp0kz566fwbpc87z7haq7xj"
	args = [ "server", "-config", "/etc/config.json" ]
        readonly_rootfs = true
        ports = [ "web_port" ]
        volumes = [
          "secrets/config.json:/etc/config.json"
        ]
      }

      template {
        data = file("../config/guichet/config.json.tpl")
        destination = "secrets/config.json"
      }

      resources {
        memory = 200
      }

      service {
        name = "guichet"
        tags = [
          "guichet",
          "tricot guichet.deuxfleurs.fr",
          "d53-cname guichet.deuxfleurs.fr",
        ]
        port = "web_port"
        address_mode = "host"
        check {
          type = "tcp"
          port = "web_port"
          interval = "60s"
          timeout = "5s"
          check_restart {
            limit = 3
            grace = "90s"
            ignore_warnings = false
          }
        }
      }
    }
  }
}