docker-compose, mount live database from host

My goal is to have a program running on the host machine that writes data to a sqlite db that is then transferred (mounted) to a docker-compose running Grafana.

It is possible to do this with the following configuration

grafana:
    container_name: grafana
    networks:
      - backend
    image: grafana/grafana:latest
    volumes:
      - ../database/database.sqlite:/home/grafana/database.sqlite
      - ./grafana/grafana.ini:/etc/grafana/grafana.ini
      - ./grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yaml
    ports:
      - 3000:3000

networks:
  backend:

volumes:
  grafana_data:
    external: true

However, this will only mount the DB at the time of creation, any new changes written to the db will not be reflected on the container.

How can I solve this?

I assume you want to achieve something on balenaCloud since you are asking in the balena forums.
I don’t understand completely your use case, but it sounds like you need a volume and mount that in the source and the reader container as well.