-
Notifications
You must be signed in to change notification settings - Fork 40
/
docker-compose.yml
116 lines (110 loc) · 2.65 KB
/
docker-compose.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
x-definitions:
x-shared-env:
&common-env
NEO4J_AUTH: neo4j/testtest
NEO4J_PLUGINS: '["apoc"]'
x-shared-cluster-env:
&common-cluster-env
<<: *common-env
NEO4J_ACCEPT_LICENSE_AGREEMENT: 'yes'
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
x-shared-core-env:
&common-core-env
<<: *common-cluster-env
NEO4J_initial_server_mode__constraint: 'PRIMARY'
x-common:
&common
image: neo4j:5-enterprise
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider localhost:7474 || exit 1" ]
env_file:
- .env
x-common-php:
&common-php
build:
context: .
dockerfile: Dockerfile
args:
PHP_VERSION: ${PHP_VERSION}
volumes:
- .:/opt/project
x-common-cluster:
&common-cluster
<<: *common
image: neo4j:5-enterprise
networks:
neo4j-cluster:
networks:
neo4j:
neo4j-cluster:
services:
client:
<<: *common-php
networks:
- neo4j
- neo4j-cluster
volumes:
- .:/opt/project
env_file:
- .env
depends_on:
neo4j:
condition: service_healthy
neo4j:
<<: *common
image: neo4j:5.20-community
hostname: neo4j
networks:
- neo4j
ports:
- "11687:7687"
- "11474:7474"
environment:
<<: *common-env
NEO4j_server_bolt_advertised_address: localhost:11687
NEO4j_server_http_advertised_address: localhost:11474
server1:
<<: *common-cluster
hostname: server1
ports:
- "7687:7687"
- "7473:7473"
- "7474:7474"
environment:
<<: *common-core-env
NEO4j_server_bolt_advertised_address: localhost:7687
NEO4j_server_http_advertised_address: localhost:7474
server2:
<<: *common-cluster
hostname: server2
ports:
- "8687:7687"
- "8473:7473"
- "8474:7474"
environment:
<<: *common-core-env
NEO4j_server_bolt_advertised_address: localhost:8687
NEO4j_server_http_advertised_address: localhost:8474
server3:
<<: *common-cluster
hostname: server3
ports:
- "9474:7474"
- "9473:7473"
- "9687:7687"
environment:
<<: *common-core-env
NEO4j_server_bolt_advertised_address: localhost:9687
NEO4j_server_http_advertised_address: localhost:9474
server4:
<<: *common-cluster
hostname: server4
ports:
- "10474:7474"
- "10473:7473"
- "10687:7687"
environment:
<<: *common-cluster-env
NEO4J_initial_server_mode__constraint: 'SECONDARY'
NEO4j_server_bolt_advertised_address: localhost:10687
NEO4j_server_http_advertised_address: localhost:10474