Şöyle yaparız. Burada ortam değişkenleri JAVA_OPTS ile geçiliyor.
version: "2"services:postgres:image: postgres:12.4environment:- POSTGRES_USER=postgres- POSTGRES_PASSWORD=postgres- POSTGRES_DB=passwordports:- 5432:5432hazelcast:image: hazelcast/hazelcast:3.11ports:- 5701:5701environment:- 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