Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker Hazelcast Cluster with support for auto-scaling The service discovery is provided through DCHQ's plug-in framework. The service discovery framework in DCHQ provides event-driven life-cycle stages that executes custom scripts to re-configure application components. This is critical when scaling out clusters for which a load balancer may ne…
Hazelcast-Management-Center:
image: hazelcast/management-center:latest
# Use this configuration if deploying to a shared VM
publish_all: true
# (Recommended) Use this configuration if deploying to a dedicated VM
#ports:
# - 8080:8080
host: host1
environment:
- HAZELCAST_IP={{Hazelcast | container_private_ip}}
Hazelcast:
image: hazelcast/hazelcast:latest
# Use this configuration if deploying to a shared VM
publish_all: true
# (Recommended) Use this configuration if deploying to a dedicated VM
#ports:
# - 5701:5701
cluster_size: 1
host: host1
plugins:
- !plugin
id: Qgp4H
lifecycle: post_create, post_scale_out:Hazelcast, post_scale_in:Hazelcast
restart: true
arguments:
# Use this configuration if deploying to a shared VM
- Hazelcast_IP=<member>{{Hazelcast | container_private_ip}}</member>
# (Recommended) Use this configuration if deplying to a dedicated VM
#- Hazelcast_IP=<member>{{Hazelcast | ip}}</member>
- Management_Center_URL=http://{{Hazelcast-Management-Center | ip}}:{{Hazelcast-Management-Center | port_8080}}/mancenter
environment:
# Uncomment the line below to specify the heap size
#- MIN_HEAP_SIZE="1g"
# Uncomment the line below to provide your own hazelcast.xml file
- JAVA_OPTS=-Dhazelcast.config=/opt/hazelcast/hazelcast.xml
volumes:
# Uncomment the line below if you plan to use your own hazelcast.xml file
#- ./configFolder:./configFolder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.