Hi, I got confused in compose deploy endpoint_mode and service port settings.
below are my config files.
version: "3.9"
services:
wpstpdf:
image: miracle/wpstpdfconverter:v1.3
volumes:
- /opt/wwwroot:/opt/wwwroot:rw
ports:
- target: 8083
#published: 9001
mode: host
networks:
mybridge:
ipv4_address: 172.19.19.10
deploy:
mode: replicated
replicas: 4
endpoint_mode: vip
environment:
- RACK_ENV=development
- SHOW=true
- USER_INPUT
- TZ=Asia/Shanghai
labels:
- "com.miracle.description=wpstpdf converter"
networks:
mybridge:
ipam:
config:
- subnet: "172.19.19.0/24"
when services.deploy.endpoint_mode=vip should i config a ip address for the service? I setting the ip but i got “error response from daemon: Address already in use” if not setting the ip address what will the virtual ip be? and what port will outside client access for ?
if i config the port using map like “8083:8083” , and it will got the same error. and I saw the document that the service.network.ports.mode can be “ingress” for load blance what is the relationsip between ports.mode and deploy.endpoint_mode ?
my purpose is to deploy 4 instance container for the service and using virtual ip and public port to provide service , how can i make it work and what should I setting in the compose file? thank you!