File size: 1,113 Bytes
19faf57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<#

Starts Neo4j via docker compose if Docker CLI is available on the host.

This script only runs docker commands locally; it does not install Docker.



Usage: open PowerShell as a user that can run Docker and execute:

  .\scripts\start_neo4j_if_docker.ps1

#>

Write-Host "Checking for Docker CLI..."
if (-not (Get-Command docker -ErrorAction SilentlyContinue)) {
    Write-Error "Docker CLI not found. Please install Docker Desktop and ensure 'docker' is on PATH."
    exit 1
}

Write-Host "Starting Neo4j docker compose..."
docker compose -f "${PSScriptRoot}\..\docker-compose.neo4j.yml" up -d

Write-Host "Waiting 20 seconds for Neo4j to come up..."
Start-Sleep -s 20

try {
    $resp = Invoke-WebRequest -Uri http://localhost:7474 -UseBasicParsing -ErrorAction Stop
    Write-Host "Neo4j HTTP endpoint reachable (http://localhost:7474)"
} catch {
    Write-Warning "Neo4j HTTP endpoint not reachable. Check docker logs: docker compose -f docker-compose.neo4j.yml logs"
}

Write-Host "Done. If Neo4j needs authentication, default creds used in docker-compose are neo4j/testpassword."