job "presencia" {
  region      = "global"
  datacenters = ["samfelag"]
  type        = "service"

  group "presencia" {
    count = 1

    restart {
      attempts = 5
      delay    = "15s"
    }

    network {
      port "http" {
        to = 5000
      }
    }

    # PRESENCIA APP
    task "presencia" {
      driver = "docker"

      config {
        image = "marc.sastre.cat/presencia"
        ports = ["http"]
      }

      resources {
        cpu    = 50
        memory = 64
      }

      service {
        name = "presencia"
        port = "http"
      }
    }
  }
}

