目的
Neo4j(Docker)でconfをいじる.
前提
- brewでneo4jをインストール済み
- Dockerがインストール済み(筆者はMacアプリ版を使用)
※neo4jとDockerがインストールされていれば, 問題ないと思います.
操作は少し変わるかもしれませんが
Docker neo4jイメージをダウンロード
DockerHubにある公式Dockerイメージをダウンロードする.
❯❯❯ docker pull neo4j
Using default tag: latest
latest: Pulling from library/neo4j
4fe2ade4980c: Pull complete
6fc58a8d4ae4: Pull complete
819f4a45746c: Pull complete
6b424cc95557: Pull complete
7b0c76e0ed27: Pull complete
e668f80bbb60: Pull complete
1a539cb3038a: Pull complete
Digest: sha256:a96d81360ab435fa61941844a484144aadd9034f0684437ce02e12e2b461230f
Status: Downloaded newer image for neo4j:latest
conf
docker run \
--detach \
--publish=7474:7474 --publish=7687:7687 \
--volume=$HOME/neo4j/data:/data \
--volume=$HOME/neo4j/logs:/logs \
--volume=$HOME/neo4j/conf:/conf \
neo4j:3.0
docker run --rm \
--volume=$HOME/neo4j/conf:/conf \
neo4j:3.0 dump-config
confフォルダにneo4j-wrapper.conf, neo4j.confが生成される.
neo4j.confをいじります.
neo4j.conf
# Bolt connector
dbms.connector.bolt.type=BOLT
dbms.connector.bolt.enabled=true
dbms.connector.bolt.tls_level=OPTIONAL
# To have Bolt accept non-local connections, uncomment this line
# dbms.connector.bolt.address=0.0.0.0:7687
# HTTP Connector. There must be exactly one HTTP connector.
dbms.connector.http.type=HTTP
dbms.connector.http.enabled=true
# To accept non-local HTTP connections, uncomment this line
#dbms.connector.http.address=0.0.0.0:7474
# HTTPS Connector. There can be zero or one HTTPS connectors.
dbms.connector.https.type=HTTP
dbms.connector.https.enabled=true
dbms.connector.https.encryption=TLS
# To accept non-local HTTPS connection, change 'localhost' to '0.0.0.0'
dbms.connector.https.address=localhost:7473
使用目的に合わせて, アンコメントもしくは, localhost:0.0.0.0に変更する
neo4j.conf(抜粋)
# To have Bolt accept non-local connections, uncomment this line
# dbms.connector.bolt.address=0.0.0.0:7687
neo4j.conf(抜粋)
# To accept non-local HTTP connections, uncomment this line
dbms.connector.http.address=0.0.0.0:7474
neo4j.conf(抜粋)
# To accept non-local HTTPS connection, change 'localhost' to '0.0.0.0'
dbms.connector.https.address=localhost:7473