job "cua-quinto" {
  region      = "global"
  datacenters = ["samfelag"]
  type        = "service"

  group "cua-quinto" {
    count = 1

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

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

    # CUA-QUINTO APP
    task "cua-quinto" {
      driver = "docker"

      env {
	      API_PREFIX = "/cua-quinto"
	      API_SCHEME = "https"
      }

      config {
        image = "marc.sastre.cat/quinto-cua:latest"
        ports = ["http"]
      }

      resources {
        cpu    = 50
        memory = 64
      }

      service {
        name = "cua-quinto"
        port = "http"
      }
    }
  }
}

