0

I am using the weaviate-php plugin in my Laravel project.if I try the authentication with the weaviate cloud console everything works perfectly fine I want to self-host using docker. here is my docker configuration for the weaviate:

  weaviate:
    image: semitechnologies/weaviate:1.20.1
    ports:
        - "8080:8080"
    restart: on-failure
    volumes:
        - /var/weaviate:/var/lib/weaviate
    environment:
        QUERY_DEFAULTS_LIMIT: 25
        AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
        PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
        DEFAULT_VECTORIZER_MODULE: 'none'
        ENABLE_MODULES: ''
        CLUSTER_HOSTNAME: 'node1'

My first problem is when using this package, the way it is developed, it required the API token as a required parameter.

$weaviate = new Weaviate('http://0.0.0.0:8080/v1','api-token');

now if I don't want the authentication as I have mentioned in the docker-compose how can I make this plugin allow the new connection instead it gives a connection refused error.

Also, the weaviate is running I can access this(http://0.0.0.0:8080/v1) URL on postman, it gives me following response:

enter image description here

but when I try to get the dataObjects and all it gives me connection refused.

is there anything I am missing here or do they need to work on that API token parameter that it should be nullable or something like this ?

Faizan
  • 33
  • 10
  • Try to change `0.0.0.0` with `localhost` in your code, and I found that the URL in postman has a slash at the end of the url, that may be the cause of your problem. – Mohamed Ayadi Jul 17 '23 at 08:39
  • @MohamedAyadi Thanks, but no the problem is not with this URL, i want to get the objects or save the vectorized objects in the weaviate, when I try this plugin with the weaviate cloud services it works but when used with docker it's not letting me even get the data objects. – Faizan Jul 17 '23 at 08:49
  • Then try to change `localhost` with the IP adresse of your machine in your local network, because the container cannot communicate with `localhost` inside your container – Mohamed Ayadi Jul 18 '23 at 09:03
  • 1
    Thanks, @MohamedAyadi, I just solved my problem. There was an issue with the network configuration for the weaviate. – Faizan Jul 18 '23 at 09:44
  • Good for you, just mark the question as resolved and answer it with the right configuration – Mohamed Ayadi Jul 18 '23 at 09:55

0 Answers0