-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (47 loc) · 1.39 KB
/
docker-compose.yml
File metadata and controls
49 lines (47 loc) · 1.39 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: '3.8'
networks:
neo4j_network:
driver: bridge
services:
neo4j:
image: neo4j:latest
container_name: neo4j
restart: unless-stopped
# pass .env file to container
env_file: .env
ports:
- 7474:7474 # web client
- 7687:7687 # db default port
volumes:
- ./example/neo4j:/var/lib/neo4j/import
environment:
- NEO4j_dbms.security.auth_enabled='true'
# install graph-data-science plugin
- NEO4JLABS_PLUGINS=["apoc", "graph-data-science"]
- apoc.import.file.enabled=True
# listen to incoming connections
- NEO4J_dbms.connector.bolt.listen_address=0.0.0.0:7687
# Raise memory limits
- NEO4J_dbms_memory_pagecache_size=2G
- NEO4J_dbms.memory.heap.initial_size=2G
- NEO4J_dbms_memory_heap_max__size=2G
networks:
- neo4j_network
app:
build: . # build from Dockerfile
container_name: app
env_file: .env
environment:
- WAIT_HOSTS=neo4j:7687
- WAIT_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=30
- WAIT_HOST_CONNECT_TIMEOUT=30
links:
- neo4j
command: >
sh -c "/wait \
&& python -m loader --file 'example/neo4j/query_constraints.cypher' \
&& python -m loader --file 'example/neo4j/query_nodes.cypher' \
&& python -m loader --file 'example/neo4j/query_relationships.cypher'"
networks:
- neo4j_network