I'm creating an app which uses Weaviate locally. I have added created a docker-compose.yml file and ran docker-compose up in terminal to start the weaviate database. I have created a schema and added some data to my database and everything works fine. However, when I clone the code to another computer, the app crashes and it seems that the whole database schema and added data are gone. I'm new to docker and weaviate and don't know how to solve this problem. I would appreciate if any one can help me. My docker-compose.yml file was like this:
---
version: '3.4'
services:
weaviate:
command:
- --host
- 0.0.0.0
- --port
- '8080'
- --scheme
- http
image: semitechnologies/weaviate:1.18.0
volumes:
- /var/weaviate:/var/lib/weaviate
ports:
- 8080:8080
restart: on-failure:0
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'
...
I have searched a little and changed my volumes like shown below. But didn't help.
---
version: '3.4'
services:
weaviate:
command:
- --host
- 0.0.0.0
- --port
- '8080'
- --scheme
- http
image: semitechnologies/weaviate:1.18.0
volumes:
- weaviate-data:/data
ports:
- 8080:8080
restart: on-failure:0
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'
volumes:
weaviate-data:
...