Skip to content

Instantly share code, notes, and snippets.

@alo9507
Last active October 22, 2020 15:00
Show Gist options
  • Save alo9507/25fbd5645295bc4cf289d3476a6e2c1e to your computer and use it in GitHub Desktop.
Save alo9507/25fbd5645295bc4cf289d3476a6e2c1e to your computer and use it in GitHub Desktop.
An Apollo-GraphQL server set up in front of a Neo4j DB, all on Docker
# 0) Save this raw text to a file titled `docker-compose.yml` somewhere on your machine
# 1) Install Docker Desktop from https://hub.docker.com/editions/community/docker-ce-desktop-mac/
# This install the docker and docker-compose CLI as well
# 2) Run `docker-compose up` in the directory containing the docker-compose.yml file
# 3) Go to `http://localhost:4000` to run run some GraphQL queries against a NEO4J DB without even having it installed on your machine
# 4) Go to `http://localhost:7474`, choose "No Authentication" and click connect to interact directly with data in the local Neo4J DB
version: "3"
services:
neo4j:
image: neo4j
ports:
- "7474:7474"
- "7687:7687"
environment:
- NEO4J_AUTH=none
api:
depends_on:
- "neo4j"
image: alo42/localhost-api
ports:
- '4000:4000'
environment:
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=neo4j
- NEO4J_ENCRYPTED=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment