Tidyup memcached impl.
This commit is contained in:
parent
d31b0d4fb3
commit
cfc409a998
2 changed files with 6 additions and 9 deletions
products/memcached
|
@ -1,3 +1,8 @@
|
||||||
|
variable "enable" {
|
||||||
|
type = bool
|
||||||
|
description = "Whether to enable the service."
|
||||||
|
default = true
|
||||||
|
}
|
||||||
variable "memcached_image" {
|
variable "memcached_image" {
|
||||||
default = "memcached"
|
default = "memcached"
|
||||||
type = string
|
type = string
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
module "service" {
|
module "service" {
|
||||||
source = "../../docker/service"
|
source = "../../docker/service"
|
||||||
|
enable = var.enable
|
||||||
image = "${var.memcached_image}:${var.memcached_version}"
|
image = "${var.memcached_image}:${var.memcached_version}"
|
||||||
stack_name = var.stack_name
|
stack_name = var.stack_name
|
||||||
service_name = var.service_name
|
service_name = var.service_name
|
||||||
|
@ -11,15 +12,6 @@ module "service" {
|
||||||
#healthcheck_timeout = "5s"
|
#healthcheck_timeout = "5s"
|
||||||
#healthcheck_retries = 3
|
#healthcheck_retries = 3
|
||||||
converge_enable = false # @todo MB: fix healthcheck and fix this.
|
converge_enable = false # @todo MB: fix healthcheck and fix this.
|
||||||
volumes = local.volumes
|
|
||||||
mounts = local.mounts
|
|
||||||
ports = var.ports
|
ports = var.ports
|
||||||
placement_constraints = var.placement_constraints
|
placement_constraints = var.placement_constraints
|
||||||
}
|
}
|
||||||
|
|
||||||
locals {
|
|
||||||
volumes = var.data_persist_path == null ? {
|
|
||||||
"data" = "/var/lib/mysql"
|
|
||||||
} : {}
|
|
||||||
mounts = var.data_persist_path != null ? zipmap([var.data_persist_path], ["/var/lib/mysql"]) : {}
|
|
||||||
}
|
|
Loading…
Reference in a new issue