I am trying to write a small python web service that calls a Neo4J database. This is purely in a development environment. I would like to load some CSV data when the Neo4J container starts.
I have tried using the
EXTENSION_SCRIPT environment setting to load data with a script like
echo "Loading data"
neo4j-admin import --nodes=/var/lib/neo4j/import/test.csv
I keep getting errors of the following form
WARNING Import failed. The store files in /data/databases/neo4j are left as they are, although they are likely in an unusable state
I am assuming that the load needs to happen before
neo4j is started as there is some lock on the db files. Has anyone solved this problem ?
My Docker-compose is as follows:
# Raise memory limits
And my Dockerfile :
COPY load.sh /load.sh
RUN chmod +x /load.sh
COPY test.csv /var/lib/neo4j/import/test.csv
Source: Docker Questions