Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore(other): add tail command as template comment to docker-compose.yml #6755

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ services:
# TODO: clarify if that is the only thing needed to unlock the Enterprise version
# - NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
# TODO: Remove the playground from production
# bring the database in offline mode to export or load dumps
# command: ["tail", "-f", "/dev/null"]

networks:
external-net:
Expand Down
12 changes: 12 additions & 0 deletions neo4j/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ in `backend/.env`.

Start Neo4J and confirm the database is running at [http://localhost:7474](http://localhost:7474).

## Operations on Neo4j

### Import Neo4j Dump Locally in Docker

To import a dump into Neo4j running in a Docker container:

- we need to set `command: ["tail", "-f", "/dev/null"]` in the Neo4j block of `docker-compose.yml` on top level so the Neo4j database is in maintenance mode
- copy the dump into the running Docker container: `docker cp /path/to/dump <docker-image>:/existing-directory-in-docker/`
- connect to the Docker containers Neo4j terminal: `docker exec -it neo4j bash`
- to load the dump into the database we need the following command in this terminal: `neo4j-admin load --expand-commands --database=graph.db --from /backups/neo4j-dump --force`
- leave the terminal by entering: `exit`

## Commands

Here we describe some rarely used Cypher commands for Neo4j that are needed from time to time:
Expand Down