Skip to content

Commit

Permalink
Use default volumes instead of bind
Browse files Browse the repository at this point in the history
  • Loading branch information
tellet-q committed Sep 19, 2024
1 parent db06a11 commit 2951b5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,3 @@ services:
volumes:
qdrant_storage:
name: "qdrant_storage"
driver: local
driver_opts:
type: none
device: ${PWD}/qdrant_storage
o: bind
6 changes: 2 additions & 4 deletions tools/run_server_container_with_volume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ if [[ ${QDRANT_VERSION} == docker/* ]] || [[ ${QDRANT_VERSION} == ghcr/* ]]; the
fi

if [[ "$EXECUTION_MODE" == "init" ]]; then
# create volume qdrant_storage
echo "Initialize qdrant from scratch"
DOCKER_VOLUME_SET_UP="docker volume rm -f qdrant_storage; sudo rm -rf qdrant_storage; mkdir qdrant_storage"
DOCKER_COMPOSE="export QDRANT_VERSION=${QDRANT_VERSION}; export CONTAINER_REGISTRY=${CONTAINER_REGISTRY}; export CONTAINER_MEM_LIMIT=${CONTAINER_MEM_LIMIT}; docker compose down; pkill qdrant; docker rm -f qdrant-continuous || true; docker rmi -f ${CONTAINER_REGISTRY}/qdrant/qdrant:${QDRANT_VERSION} || true ; ${DOCKER_VOLUME_SET_UP}; docker compose up -d; docker container ls -a"
echo "Initialize qdrant from scratch, with qdrant_storage volume"
DOCKER_COMPOSE="export QDRANT_VERSION=${QDRANT_VERSION}; export CONTAINER_REGISTRY=${CONTAINER_REGISTRY}; export CONTAINER_MEM_LIMIT=${CONTAINER_MEM_LIMIT}; docker compose down; pkill qdrant; docker rm -f qdrant-continuous || true; docker rmi -f ${CONTAINER_REGISTRY}/qdrant/qdrant:${QDRANT_VERSION} || true; docker volume rm -f qdrant_storage || true; docker compose up -d; docker container ls -a"
else
# suggest that volume qdrant_storage exist and start qdrant
echo "Reload qdrant with existing data"
Expand Down

0 comments on commit 2951b5f

Please sign in to comment.