job "velocity" { type = "service" group "velocity" { network { mode = "bridge" port "ingress" { static = 25565 } dns { servers = ["172.17.0.1"] } } service { name = "velocity" port = "ingress" address_mode = "host" check { type = "tcp" interval = "5s" timeout = "1s" } } ephemeral_disk { size = 5000 # 5 gb } task "download-plugins" { driver = "docker" lifecycle { hook = "prestart" sidecar = false } config { image = "busybox" command = "sh" volumes = ["../alloc/data:/mnt"] args = [ "-xec", <<-EOF mkdir -p /mnt/plugins wget -P /mnt/plugins \ https://git.lab0x13.site/api/packages/scrow/generic/core-velocity/UNVERSIONED/CoreVelocity.jar EOF ] } } task "velocity" { driver = "docker" config { image = "git.lab0x13.site/scrow/velocity:0.1" ports = ["ingress"] volumes = ["../alloc/data:/mnt"] } env { HOST_POSTGRES = "jdbc:postgresql://postgres.service.consul/scrow" HOST_NATS = "nats://nats.service.consul" HOST_CONSUL = "http://172.17.0.1:8500" } resources { cpu = 1000 memory = 500 } } } }