We need preloaded Weaviate Docker image for local development (the database is not big and can go in GIT). We need something like in Postgres ( preloading with test_dump)
COPY test_dump.sql /docker-entrypoint-initdb.d/
Current workaround is with the backup module
ENABLE_MODULES: 'text2vec-openai,backup-filesystem'
I have crated backup and mounted it with volume in docker-compose.But extra step is needed with this solution. When container is already running, the restore database needs to be done manually (via rest endpoint http://localhost:8090/v1/backups/filesystem/my-very-first-backup/restore).
Current docker-compose.yaml with backup-filesystem module
version: "3.7"
services:
weaviate:
image: semitechnologies/weaviate:1.17.3
ports:
- 8081:8080
environment:
QUERY_DEFAULTS_LIMIT: 25
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
PERSISTENCE_DATA_PATH: './data'
ENABLE_MODULES: 'text2vec-openai,backup-filesystem'
DEFAULT_VECTORIZER_MODULE: 'text2vec-openai'
OPENAI_APIKEY: $OPEN_AI_TOKEN
BACKUP_FILESYSTEM_PATH: '/var/lib/weaviate-backup'
AUTOSCHEMA_ENABLED: 'false'
CLUSTER_HOSTNAME: 'node1'
LOG_LEVEL: 'debug'
volumes:
- ./weaviate_data:/var/lib/weaviate-backup
Looking for a clean solution where a new developer will run
docker-compose up
and preloaded Weaviate database will be up&running