24 Şubat 2023 Cuma

Docker Compose ve Hazelcast

Örnek
Şöyle yaparız. Burada ortam değişkenleri JAVA_OPTS ile geçiliyor.
version: "2"
services:
  postgres:
    image: postgres:12.4
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=password
    ports:
      - 5432:5432
  hazelcast:
    image: hazelcast/hazelcast:3.11
    ports:
      - 5701:5701
    environment:
      - JAVA_OPTS=-Dhazelcast.local.publicAddress=localhost:5701
Örnek
Şöyle yaparız.
version: '3.8'
name: HZ
services:
  hazelcast1:
    hostname: hazelcast1
    image: hazelcast/hazelcast:5.3.2
    deploy:
      mode: replicated
      replicas: 1
  hazelcast2:
    hostname: hazelcast2
    image: hazelcast/hazelcast:5.3.2
    deploy:
      mode: replicated
      replicas: 1
  hazelcast3:
    hostname: hazelcast3
    image: hazelcast/hazelcast:5.3.2
    deploy:
      mode: replicated
      replicas: 1
Örnek 
Şöyle yaparız. Burada ortam değişkenleri bir örüntüye göre geçiliyor.
version: '3.8'
name : HZ
services:
  hazelcast1:
    hostname: hazelcast1
    image: hazelcast/hazelcast:5.1.1-slim
    environment:
      HZ_NETWORK_JOIN_TCPIP_ENABLED: 'true'
      HZ_NETWORK_JOIN_TCPIP_MEMBERS: hazelcast1,hazelcast2,hazelcast3
    deploy:
      mode: replicated
      replicas: 1
  hazelcast2:
    hostname: hazelcast2
    image: hazelcast/hazelcast:5.1.1-slim
    environment:
      HZ_NETWORK_JOIN_TCPIP_ENABLED: 'true'
      HZ_NETWORK_JOIN_TCPIP_MEMBERS: hazelcast1,hazelcast2,hazelcast3
    deploy:
      mode: replicated
      replicas: 1
  hazelcast3:
    hostname: hazelcast3
    image: hazelcast/hazelcast:5.1.1-slim
    environment:
      HZ_NETWORK_JOIN_TCPIP_ENABLED: 'true'
      HZ_NETWORK_JOIN_TCPIP_MEMBERS: hazelcast1,hazelcast2,hazelcast3
    deploy:
      mode: replicated
      replicas: 1


Hiç yorum yok:

Yorum Gönder

THIRD-PARTY.txt Dosyası

Kullanılan harici kütüphanelerin sürümleri bu dosyada Dosyanın yolu şöyle hazelcast/licenses/THIRD-PARTY.txt