Skip to content

Commit b497e15

Browse files
committed
added seperate compose file for neo4j 4
1 parent f41e116 commit b497e15

File tree

2 files changed

+162
-1
lines changed

2 files changed

+162
-1
lines changed

docker-compose-neo4j-4.yml

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
version: '3.8'
2+
3+
x-shared:
4+
&common
5+
NEO4J_AUTH: neo4j/test
6+
NEO4J_ACCEPT_LICENSE_AGREEMENT: "yes"
7+
NEO4JLABS_PLUGINS: '["apoc"]'
8+
NEO4J_dbms_security_allow__csv__import__from__file__urls: "true"
9+
10+
x-shared-cluster:
11+
&common-cluster
12+
<<: *common
13+
NEO4J_causal__clustering_initial__discovery__members: core1:5000,core2:5000,core3:5000
14+
NEO4J_dbms_memory_pagecache_size: 100M
15+
NEO4J_dbms_memory_heap_initial__size: 100M
16+
NEO4J_causal__clustering_discovery__listen__address: 0.0.0.0:5000
17+
NEO4J_causal__clustering_transaction__listen__address: 0.0.0.0:6000
18+
NEO4J_causal__clustering_raft__listen__address: 0.0.0.0:7000
19+
20+
x-shared-core:
21+
&common-core
22+
<<: *common-cluster
23+
NEO4J_dbms_mode: CORE
24+
NEO4J_causal__clustering_minimum__core__cluster__size__at__formation: 3
25+
26+
networks:
27+
neo4j:
28+
driver: bridge
29+
30+
services:
31+
client:
32+
build:
33+
context: .
34+
dockerfile: Dockerfile
35+
working_dir: /opt/project
36+
networks:
37+
- neo4j
38+
volumes:
39+
- .:/opt/project
40+
expose:
41+
- 9000
42+
env_file:
43+
- .env
44+
testkit-backend:
45+
build:
46+
context: .
47+
dockerfile: Dockerfile
48+
args:
49+
- WITH_XDEBUG=true
50+
working_dir: /opt/project
51+
volumes:
52+
- .:/opt/project
53+
command: php /opt/project/testkit-backend/index.php
54+
networks:
55+
- neo4j
56+
depends_on:
57+
- neo4j
58+
ports:
59+
- "9876:9876"
60+
neo4j:
61+
networks:
62+
- neo4j
63+
image: neo4j:4.4-enterprise
64+
healthcheck:
65+
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
66+
interval: 30s
67+
timeout: 10s
68+
retries: 5
69+
ports:
70+
- "7687:7687"
71+
- "7474:7474"
72+
environment:
73+
<<: *common
74+
volumes:
75+
- ./tests/resources:/import
76+
env_file:
77+
- .env
78+
core1:
79+
image: neo4j:4.4-enterprise
80+
healthcheck:
81+
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
82+
interval: 30s
83+
timeout: 10s
84+
retries: 5
85+
networks:
86+
- neo4j
87+
volumes:
88+
- ./tests/resources:/import
89+
environment:
90+
<<: *common-core
91+
NEO4J_causal__clustering_discovery__advertised__address: core1:5000
92+
NEO4J_causal__clustering_transaction__advertised__address: core1:6000
93+
NEO4J_causal__clustering_raft__advertised__address: core1:7000
94+
NEO4J_dbms_connector_http_advertised__address: core1:7474
95+
NEO4J_dbms_connector_bolt_advertised__address: core1:7687
96+
env_file:
97+
- .env
98+
99+
core2:
100+
image: neo4j:4.4-enterprise
101+
healthcheck:
102+
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
103+
interval: 30s
104+
timeout: 10s
105+
retries: 5
106+
networks:
107+
- neo4j
108+
environment:
109+
<<: *common-core
110+
NEO4J_causal__clustering_discovery__advertised__address: core2:5000
111+
NEO4J_causal__clustering_transaction__advertised__address: core2:6000
112+
NEO4J_causal__clustering_raft__advertised__address: core2:7000
113+
NEO4J_dbms_connector_http_advertised__address: core2:7474
114+
NEO4J_dbms_connector_bolt_advertised__address: core2:7687
115+
volumes:
116+
- ./tests/resources:/import
117+
env_file:
118+
- .env
119+
120+
core3:
121+
image: neo4j:4.4-enterprise
122+
healthcheck:
123+
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
124+
interval: 30s
125+
timeout: 10s
126+
retries: 5
127+
networks:
128+
- neo4j
129+
environment:
130+
<<: *common-core
131+
NEO4J_causal__clustering_discovery__advertised__address: core3:5000
132+
NEO4J_causal__clustering_transaction__advertised__address: core3:6000
133+
NEO4J_causal__clustering_raft__advertised__address: core3:7000
134+
NEO4J_dbms_connector_http_advertised__address: core3:7474
135+
NEO4J_dbms_connector_bolt_advertised__address: core3:7687
136+
volumes:
137+
- ./tests/resources:/import
138+
env_file:
139+
- .env
140+
141+
readreplica1:
142+
image: neo4j:4.4-enterprise
143+
healthcheck:
144+
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
145+
interval: 30s
146+
timeout: 10s
147+
retries: 5
148+
networks:
149+
- neo4j
150+
environment:
151+
<<: *common-cluster
152+
NEO4J_dbms_mode: READ_REPLICA
153+
NEO4J_causal__clustering_discovery__advertised__address: readreplica1:5000
154+
NEO4J_causal__clustering_transaction__advertised__address: readreplica1:6000
155+
NEO4J_causal__clustering_raft__advertised__address: readreplica1:7000
156+
NEO4J_dbms_connector_http_advertised__address: readreplica1:7474
157+
NEO4J_dbms_connector_bolt_advertised__address: readreplica1:7687
158+
env_file:
159+
- .env
160+
volumes:
161+
- ./tests/resources:/import

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ x-definitions:
1717
NEO4J_initial_server_mode__constraint: 'PRIMARY'
1818
x-common:
1919
&common
20-
image: neo4j:5.3
20+
image: neo4j:5.5
2121
user: ${USER_ID}:${GROUP_ID}
2222
healthcheck:
2323
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider localhost:7474 || exit 1" ]

0 commit comments

Comments
 (0)