-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathfakeservice.nomad.hcl
57 lines (50 loc) · 1.12 KB
/
fakeservice.nomad.hcl
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
variable "front_version" {
type = string
default = "v0.26.2"
}
job "front-service" {
group "frontend" {
network {
mode = "bridge"
port "http" {
to = 9090
}
}
service {
name = "front-service"
tags = ["web","frontend"]
port = 9090
# # For TProxy and Consul Connect we need to use the port and address of the Allocation
# address_mode = "alloc"
connect {
sidecar_service {
proxy {
transparent_proxy {}
}
}
}
}
task "web" {
driver = "docker"
config {
image = "nicholasjackson/fake-service:${var.front_version}"
ports = ["http"]
}
# identity {
# env = true
# file = true
# }
# resources {
# cpu = 500
# memory = 256
# }
env {
PORT = "9090"
LISTEN_ADDR = "0.0.0.0:9090"
MESSAGE = "Hello World fron Frontend V1"
NAME = "web"
# UPSTREAM_URIS = "http://public-api.virtual.consul:9090,http://private-api.virtual.consul:9090"
}
}
}
}