Using Insights with Docker does not persist data

I am using Insights with Docker using the instructions at GitHub - frappe/insights: Open Source Business Intelligence Tool.
I can start & use insights as expected, however when I close down the container, nothing is saved, all configuration, data sources, workbooks & dashboards are lost !

Earlier I suspected that I might be shutting down the container incorrectly however the behavior is consistent across both the methods I tried viz. docker compose down and shutting using Docker Desktop.

Is this expected behavior of the docker file OR am I still missing some steps to persist the work done on Insights ?

In any frappe app data is stored in “frappe-bench/sites” directory and mariadb.

As long as sites and db volume are not deleted, data will be available.

Thank you Revant.

Is there any step / command I am missing/ should be using other than the documented ‘docker compose up -d’ to start to make this happen (I have tried stopping using docker compose down as well as Docker Desktop to stop the containers and the results were identical).

This is the docker compose file for reference https://raw.githubusercontent.com/frappe/insights/develop/docker/docker-compose.yml

‘docker volume ls’ does show a a volume named ‘frappe-insights_mariadb-data’ even after executing command ‘docker compose down’.

That’s not production setup. That is used by devcontainer setup or for development.

The sites directory doesn’t exist here. You’ll have your development bench(s) under /workspace.

Query mariadb to show databases.

Thank you for going through the file.

Correct this is development setup, I should probably have mentioned it in my original query.

However I assumed like development setup for Frappe, this will persist too.

I was able to query MariaDb from bench installed in ‘/home/frappe/frappe-bench’ and it has no entries for dashboard, charts or queries which I had created in last session(s).

This might be newbie Docker setup question though is there a way to persist this for development setup like Frappe Docker ?

I found out some weird behavior sometime back after restart, it started showing Workbook which probably comes with demo data for local installation but complained server scripts not enabled (which was not the case).

As a newbie(to Insights & Docker setup for it), not sure what is the best way forward

Update :

I found out some weird behavior sometime back after restart, it started showing Workbook which probably comes with demo data for local installation but complained server scripts not enabled (which was not the case).

This new workbook and related error of server script is only visible only if I visit http://insights.localhost:8000/app and complete the Frappe setup, else the setup is blank.

This may not be related,

If --project is not specified to compose command it will take the directory name from which the command is executed as the project name.

If you have cloned repos with same name twice, you may have re-used the volumes created by the first project.

as per instructions here GitHub - frappe/insights: Open Source Business Intelligence Tool, the volume name will be frappe-insights-mariadb-data.

Thank you again.
I checked, there is only single frappe-insights clone on entire drive.
Volume name is frappe-insights_mariadb-data (underscore instead of hyphen before mariadb-data)

I pruned all volumes and attempted again to start clean and eliminate any doubts of duplicate setup.
Identical result.
Not sure what is missing in Insights Docker setup but seems like behavior is consistent.