Skip to content

A single page Node.js app, using a Neo4j graph database, that is installed with Docker-compose on Linode.com

License

Notifications You must be signed in to change notification settings

steenhansen/sffaudio-search-docker-compose

Repository files navigation

SFFaudio-Search, with Docker-compose

SFFaudio-Search was a single page Node.js app that was injected into SFFaudio.com's WordPress search page. It was discontinued because of human intervention needed for manual linking of text posts. It enabled fast and easy searching of SFFaudio's online content of authors, stories, blog-posts, PDFs, and MP3s. Some books have two authors, such as Wolfbane.

The data is held in Google Sheets for easy text editing; PDF data, RSD data, and Podcast data. Then a Neo4j graph database links the data, while Vis.js is used to display the interactive relationships. PDFs are displayed via PDF.js on the canvas. The four small icons in the bottom left and right of the widget

  • show help
  • resize the graph to window size
  • shrink the graph
  • grow the graph

Philip K. Dick's "Beyond Lies the Wub" found after searching for 'dick':

visual explanation

Four blog posts, a PDF, an RSD MP3, a Wikipedia story link, and a link back to the author.

After clicking on "RSD # 7" a user can play the associated MP3 while reading along with the PDF:

visual explanation

Run program locally on Windows

Steps  
Get Docker Download Docker Desktop for Windows
Enter /server-content/ $ cd server-content
Launch program $ run-test-large.sh
View Neo4j database http://localhost:27474/browser
  Connect URL
       bolt://localhost:27687
  Username
       neo4j
  Password
       yer_password
View web page http://localhost/

Install on Linode.com

Steps  
Create a Linode Make a 2GB Debian 10 Linode for $10/month
SFTP files to server Copy local /server-content/ to /root/server-content/
Set install files to be executable install-1-docker-ce.sh & install-2-docker-compose.sh & install-3-check.sh
Set run files to be executable run-production.sh & run-test-large.sh & run-test-small.sh
Set bash file to be executable /bash-scripts/set-time-zone.sh
ssh into server $ ssh root@45.79.183.31
Enter /server-content/ $ cd /root/server-content/
Install Docker $ ./install-1-docker-ce.sh (had to run it twice)
Install Docker-Compose $ ./install-2-docker-compose.sh
Launch program $ ./run-production.sh
Watch container creation $ docker ps -a
View Neo4j database http://45.79.183.31:27474/browser (currently off)
  Connect URL
       bolt://45.79.183.31:27687 (currently off)
  Username
       neo4j
  Password
       yer_password
View web page http://45.79.183.31

Docker ps -a on Linode:

visual explanation

If run-production.sh is used to launch program, instead of run-test-small.sh then then there will be no Neo4j database browser at http://45.79.183.31:27474/browser

Containers on Docker Desktop:

visual explanation

Caveats

  • The Node.js Neo4j-driver used in this project is 1.7.7, very old, the current version is 4.2.1 and is not backwards compatible
  • The Neo4j Docker image used in this project is 3.4.9, very old, the current version is 4.2.2 and is not backwards compatible
  • Mobile css is not handled correctly anymore as this program's output was meant to be displayed inside of Wordpress pages

Issues

  • If you get this Docker-Compose message about the neo4j__database/4bdd0d6a0524 container being unhealthy via the node-webserver container, then check that /server-content/neo4j-data/logs/debug.log exists and has 777 permissions
    ERROR: node-webserver Container "4bdd0d6a0524" is unhealthy
  • If you get the below Neo4j message then delete the /server-content/neo4j-data/data/dbms/auth file if it exists and then restart. This occurs when the Neo4j password changes values in secret-passwords.env
    command failed: the provided initial password was not set because
    existing Neo4j users were detected at `/var/lib/neo4j/data/dbms/auth`

Created by

Steen Hansen

About

A single page Node.js app, using a Neo4j graph database, that is installed with Docker-compose on Linode.com

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages