In the meantime of this post being approved, I solved this issue…
If you look in that /data/mongot folder when you’re running, you can see the vector search index is set in one of those files. When you restart the container, it disappears. So the fix here is to persist that folder so that it doesn’t die between restarts.

services:
  mongo-atlas:
    image: mongodb/mongodb-atlas-local:7.0.14 #NOTE: This should ideally match the version in mongodb.com on the prod server.
    # privileged: true
    restart: always
    volumes:
      # Fixes issues with rebooting and not finding the key file.
      # https://www.mongodb.com/community/forums/t/persisting-data-with-mongodb-mongodb-atlas-local/286926/8
      - mongodb_config:/data/configdb
      - mongodb_data:/data/db
      # Fix issues with rebooting and not persisting the vector search index
      - mongodb_mongot:/data/mongot
    ports:
      - 27017:27017
    environment:
      - MONGODB_INITDB_ROOT_USERNAME=root
      - MONGODB_INITDB_ROOT_PASSWORD=root

volumes:
  mongodb_config:
  mongodb_data:
  mongodb_mongot:

Looks like the docs (https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-deploy-docker) need to be updated.

1 Like