Persisting data with mongodb/mongodb-atlas-local

Hi @Massimiliano_Marcon,

Thank you (and your team) for your efforts into fixing this problem. I removed all of my containers, images and volumes to have a ‘fresh’ environment in which to test out your new version. Unfortunately the outcome is the same as before…

I did however poke around a bit more. And tried this exact docker-compose file:

services:
  mongodb:
    image: mongodb/mongodb-atlas-local
    environment:
      - MONGODB_INITDB_ROOT_USERNAME=user
      - MONGODB_INITDB_ROOT_PASSWORD=pass
    ports:
      - 27019:27017
    volumes:
      - data:/data/db

volumes:
  data:

Which again, works the first time starting it up. What I did find out is that restarting (with restart, or stop followed by start) through docker and not docker-compose did work. This also included restarting the entire computer. My cautious assumption is that docker-compose down does not gracefully or completely stop the container, which makes it unable to boot again?

Hope this information helps! Have a nice weekend!