Hi,
I’m deploying a new DGraph instance with Docker 18. I’ve setup a two instance swarm, both nodes are online and fully operational. When I deploy the following compose file, the services create but hang at 0/1 replicas. I’m struggling to find out what the issue is. Note that I’m using dgraph/dgraph:latest.
version: "3"
networks:
dgraph:
services:
zero:
image: dgraph/dgraph:latest
volumes:
- data-volume:/dgraph
ports:
- 5080:5080
- 6080:6080
networks:
- dgraph
deploy:
placement:
constraints:
- node.hostname == AP-GRAPH-1
command: dgraph zero --my=zero:5080 --replicas 2
server_1:
image: dgraph/dgraph:latest
hostname: "server_1"
volumes:
- data-volume:/dgraph
ports:
- 8080:8080
- 9080:9080
networks:
- dgraph
deploy:
placement:
constraints:
- node.hostname == AP-GRAPH-1
command: dgraph server --my=server_1:7080 --lru_mb=17192 --zero=zero:5080
server_2:
image: dgraph/dgraph:latest
hostname: "server_2"
volumes:
- data-volume:/dgraph
ports:
- 8081:8081
- 9081:9081
networks:
- dgraph
deploy:
placement:
constraints:
- node.hostname == AP-GRAPH-2
command: dgraph server --my=server_2:7081 --lru_mb=17192 --zero=zero:5080 -o 1
ratel:
image: dgraph/dgraph:latest
hostname: "ratel"
ports:
- 8000:8000
networks:
- dgraph
command: dgraph-ratel
deploy:
placement:
constraints:
- node.hostname == AP-GRAPH-1
volumes:
data-volume:
What I see when I docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
2va8p4ktaroj dgraph_ratel replicated 0/1 dgraph/dgraph:latest *:8000->8000/tcp
i34iuc96w94s dgraph_server_1 replicated 0/1 dgraph/dgraph:latest *:8080->8080/tcp, *:9080->9080/tcp
y0kqqeptosev dgraph_server_2 replicated 0/1 dgraph/dgraph:latest *:8081->8081/tcp, *:9081->9081/tcp
mw5mkat80cr2 dgraph_zero replicated 0/1 dgraph/dgraph:latest *:5080->5080/tcp, *:6080->6080/tcp