Ocelot-Social/neo4j/migrate.sh
Robert Schäfer 46436ca9b1 Setup a routine how to create indices initially
In order to create the indices programmatically we need to change the
default password for security concerns. To create the user we need to
start the neo4j database. So I decided to provide a bash script that
let us do it once the container are started.

In production we must change the NEO4J_PASSWORD.
2019-02-27 18:56:23 -03:00

5 lines
295 B
Bash
Executable File

#!/usr/bin/env bash
set -e
echo "CALL dbms.security.changePassword('${NEO4J_PASSWORD}');" | cypher-shell --username neo4j --password neo4j
echo 'CALL db.index.fulltext.createNodeIndex("full_text_search",["Post"],["title", "content"]);' | cypher-shell --username neo4j --password $NEO4J_PASSWORD