mirror of https://github.com/status-im/consul.git
26 lines
519 B
Cheetah
26 lines
519 B
Cheetah
|
resource "docker_container" "{{.Node.DockerName}}-{{.Service.ID.TFString}}" {
|
||
|
name = "{{.Node.DockerName}}-{{.Service.ID.TFString}}"
|
||
|
network_mode = "container:${docker_container.{{.PodName}}.id}"
|
||
|
image = docker_image.{{.AppImageResource}}.latest
|
||
|
restart = "on-failure"
|
||
|
|
||
|
{{- range $k, $v := .Labels }}
|
||
|
labels {
|
||
|
label = "{{ $k }}"
|
||
|
value = "{{ $v }}"
|
||
|
}
|
||
|
{{- end }}
|
||
|
|
||
|
env = [
|
||
|
{{- range .Env }}
|
||
|
"{{.}}",
|
||
|
{{- end}}
|
||
|
]
|
||
|
|
||
|
command = [
|
||
|
{{- range .Command }}
|
||
|
"{{.}}",
|
||
|
{{- end }}
|
||
|
]
|
||
|
}
|