My guess is that the problem you are seeing is that at one point you installed mongoose globally (npm install -g), so that it isn’t included in your package.json. You are going to need to install it locally for this to work.
Next, you will need to modify your Dockerfile and package.json so that mongoose is actually installed and run, and that your database is on a volume. I’ve outlined this process here: