Can only Docker Compose be used for multi node deployment?

Hi @codehelen ! Welcome to our community :slight_smile:

This must be some networking issue along the way, as your docker is correct (see below)

A starting point is making sure that weaviate-node2-IP can communicate with weaviate-node1-IP on all specified ports.

A good example on how to run with ad-hoc containers (at the same docker host):

First, create a docker attachable network

docker network create weaviate --atachable

note that weaviate, above, can be whatever network name you want. Make sure to change it accordingly at the --network option, on both nodes, bellow

Run node 1

docker run --name weaviate-node1 \
-p 6080:8080  \
-p 6081:6081  \
-p 6082:6082  \
--network=weaviate \
-e "AUTHENTICATION_APIKEY_ENABLED=true" \
-e "AUTHENTICATION_APIKEY_ALLOWED_KEYS=A1iB0t_d4m0" \
-e "AUTHENTICATION_APIKEY_USERS=admin" \
-e "PERSISTENCE_DATA_PATH=/root/weaviate/data" \
-e "AUTHORIZATION_ADMINLIST_USERS=admin" \
-e "CLUSTER_HOSTNAME=weaviate-node1" \
-e "CLUSTER_GOSSIP_BIND_PORT=6081" \
-e "CLUSTER_DATA_BIND_PORT=6082" \
-d semitechnologies/weaviate:1.20.5

Run node 2

docker run --name weaviate-node2 \
-p 7080:8080  \
-p 7081:7081  \
-p 7082:7082  \
--network=weaviate \
-e "AUTHENTICATION_APIKEY_ENABLED=true" \
-e "AUTHENTICATION_APIKEY_ALLOWED_KEYS=A1iB0t_d4m0" \
-e "AUTHENTICATION_APIKEY_USERS=admin" \
-e "PERSISTENCE_DATA_PATH=/root/weaviate/data" \
-e "AUTHORIZATION_ADMINLIST_USERS=admin" \
-e "CLUSTER_HOSTNAME=weaviate-node2" \
-e "CLUSTER_GOSSIP_BIND_PORT=7081" \
-e "CLUSTER_DATA_BIND_PORT=7082" \
-e "CLUSTER_JOIN=weaviate-node1:6081" \
-d semitechnologies/weaviate:1.20.5

Now you can check your two nodes up and running:

curl http://localhost:6080/v1/nodes -H "Authorization: Bearer A1iB0t_d4m0" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   290  100   290    0     0   184k      0 --:--:-- --:--:-- --:--:--  283k
{
  "nodes": [
    {
      "gitHash": "f7c148e",
      "name": "weaviate-node1",
      "shards": null,
      "stats": {
        "objectCount": 0,
        "shardCount": 0
      },
      "status": "HEALTHY",
      "version": "1.20.5"
    },
    {
      "gitHash": "f7c148e",
      "name": "weaviate-node2",
      "shards": null,
      "stats": {
        "objectCount": 0,
        "shardCount": 0
      },
      "status": "HEALTHY",
      "version": "1.20.5"
    }
  ]
}

Let me know if this helps!

Thanks!