Skip to content

Commit

Permalink
reworked config in ci and local docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
transistive committed Sep 20, 2023
1 parent 277129a commit 2db9df8
Show file tree
Hide file tree
Showing 40 changed files with 58 additions and 196 deletions.
52 changes: 30 additions & 22 deletions .github/workflows/integration-test-cluster-neo4j-5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
env:
CONNECTION: neo4j://neo4j:testtest@localhost:7688
name: "Running on PHP 8.0 with a Neo4j 5-enterprise cluster"
name: "Running on PHP 8.0 with a Neo4j 5.10-enterprise cluster"

steps:
- uses: actions/checkout@v2
Expand All @@ -38,16 +38,18 @@ jobs:

services:
server1:
image: neo4j:5-enterprise
image: neo4j:5.10-enterprise
ports:
- 7688:7688
- 7475:7475
- 7687:7687
- 7473:7473
- 7474:7474
env:
NEO4J_initial_server_mode__constraint: PRIMARY
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
NEO4j_server_bolt_advertised_address: localhost:7688
NEO4j_server_http_advertised_address: localhost:7478
NEO4j_server_bolt_advertised_address: localhost:7687
NEO4j_server_http_advertised_address: localhost:7474
NEO4J_PLUGINS: '["apoc"]'
NEO4J_AUTH: neo4j/testtest
options: >-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
Expand All @@ -56,16 +58,18 @@ jobs:
--health-timeout "15s"
--health-retries "5"
server2:
image: neo4j:5-enterprise
image: neo4j:5.10-enterprise
ports:
- 7689:7689
- 7476:7476
- 8687:7687
- 8473:7473
- 8474:7474
env:
NEO4J_initial_server_mode__constraint: PRIMARY
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
NEO4j_server_bolt_advertised_address: localhost:7689
NEO4j_server_http_advertised_address: server2:7476
NEO4j_server_bolt_advertised_address: localhost:8687
NEO4j_server_http_advertised_address: localhost:8474
NEO4J_PLUGINS: '["apoc"]'
NEO4J_AUTH: neo4j/testtest
options: >-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
Expand All @@ -74,16 +78,18 @@ jobs:
--health-timeout "15s"
--health-retries "5"
server3:
image: neo4j:5-enterprise
image: neo4j:5.10-enterprise
ports:
- 7690:7690
- 7477:7477
- 9474:7474
- 9473:7473
- 9687:7687
env:
NEO4J_initial_server_mode__constraint: PRIMARY
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
NEO4j_server_bolt_advertised_address: localhost:7690
NEO4j_server_http_advertised_address: server3:7477
NEO4j_server_bolt_advertised_address: localhost:9687
NEO4j_server_http_advertised_address: localhost:9474
NEO4J_PLUGINS: '["apoc"]'
NEO4J_AUTH: neo4j/testtest
options: >-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
Expand All @@ -92,16 +98,18 @@ jobs:
--health-timeout "15s"
--health-retries "5"
read-server4:
image: neo4j:5-enterprise
image: neo4j:5.10-enterprise
ports:
- 7691:7691
- 7478:7478
- 10474:7474
- 10473:7473
- 10687:7687
env:
NEO4J_initial_server_mode__constraint: PRIMARY
NEO4J_initial_server_mode__constraint: SECONDARY
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
NEO4j_server_bolt_advertised_address: localhost:7691
NEO4j_server_http_advertised_address: localhost:7478
NEO4j_server_bolt_advertised_address: localhost:10687
NEO4j_server_http_advertised_address: localhost:10474
NEO4J_PLUGINS: '["apoc"]'
NEO4J_AUTH: neo4j/testtest
options: >-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-single-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
name: "Running on PHP 8.2 with a Neo4j 5.5 instance connecting over all available protocols"
name: "Running on PHP 8.2 with a Neo4j 5 instance connecting over all available protocols"

services:
neo4j:
Expand Down
91 changes: 27 additions & 64 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ x-definitions:
x-shared-cluster-env:
&common-cluster-env
<<: *common-env
NEO4J_EDITION: 'enterprise'
NEO4J_ACCEPT_LICENSE_AGREEMENT: 'yes'
EXTENDED_CONF: '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.5
user: ${USER_ID}:${GROUP_ID}
image: neo4j:5-enterprise
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider localhost:7474 || exit 1" ]
env_file:
Expand All @@ -29,7 +27,6 @@ x-definitions:
context: .
dockerfile: Dockerfile
image: neo4j-php-client:latest
user: ${USER_ID}:${GROUP_ID}
volumes:
- .:/opt/project
x-common-cluster:
Expand All @@ -38,8 +35,6 @@ x-definitions:
image: neo4j:5-enterprise
networks:
neo4j-cluster:
aliases:
- neo4j-network

networks:
neo4j:
Expand All @@ -57,95 +52,63 @@ services:
- .env
neo4j:
<<: *common
image: neo4j:5.10-community
hostname: neo4j
networks:
- neo4j
- neo4j-cluster
ports:
- "7687:7687"
- "7474:7474"
- "11687:7687"
- "11474:7474"
environment:
<<: *common-env
NEO4J_EDITION: community
volumes:
- ./neo4j/neo4j.conf:/conf/neo4j.conf
- ./neo4j/data/neo4j:/var/lib/neo4j/data
- ./neo4j/logs/neo4j:/var/lib/neo4j/logs
- ./neo4j/conf/neo4j:/var/lib/neo4j/conf
- ./neo4j/import/neo4j:/var/lib/neo4j/import
- ./neo4j/metrics/neo4j:/var/lib/neo4j/metrics
- ./neo4j/licenses/neo4j:/var/lib/neo4j/licenses
- ./neo4j/ssl/neo4j:/var/lib/neo4j/ssl
NEO4j_server_bolt_advertised_address: localhost:11687
NEO4j_server_http_advertised_address: localhost:11474

server1:
<<: *common-cluster
hostname: server1
ports:
- "7688:7687"
- "7475:7474"
volumes:
- ./neo4j/neo4j-cluster.conf:/conf/neo4j.conf
- ./neo4j/data/server1:/var/lib/neo4j/data
- ./neo4j/logs/server1:/var/lib/neo4j/logs
- ./neo4j/conf/server1:/var/lib/neo4j/conf
- ./neo4j/import/server1:/var/lib/neo4j/import
- ./neo4j/metrics/server1:/var/lib/neo4j/metrics
- ./neo4j/licenses/server1:/var/lib/neo4j/licenses
- ./neo4j/ssl/server1:/var/lib/neo4j/ssl
- "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:
- "7689:7687"
- "7476:7474"
- "8687:7687"
- "8473:7473"
- "8474:7474"
environment:
<<: *common-core-env
volumes:
- ./neo4j/neo4j-cluster.conf:/conf/neo4j.conf
- ./neo4j/data/server2:/var/lib/neo4j/data
- ./neo4j/logs/server2:/var/lib/neo4j/logs
- ./neo4j/conf/server2:/var/lib/neo4j/conf
- ./neo4j/import/server2:/var/lib/neo4j/import
- ./neo4j/metrics/server2:/var/lib/neo4j/metrics
- ./neo4j/licenses/server2:/var/lib/neo4j/licenses
- ./neo4j/ssl/server2:/var/lib/neo4j/ssl
NEO4j_server_bolt_advertised_address: localhost:8687
NEO4j_server_http_advertised_address: localhost:8474

server3:
<<: *common-cluster
hostname: server3
ports:
- "7690:7687"
- "7477:7474"
- "9474:7474"
- "9473:7473"
- "9687:7687"
environment:
<<: *common-core-env
volumes:
- ./neo4j/neo4j-cluster.conf:/conf/neo4j.conf
- ./neo4j/data/server3:/var/lib/neo4j/data
- ./neo4j/logs/server3:/var/lib/neo4j/logs
- ./neo4j/conf/server3:/var/lib/neo4j/conf
- ./neo4j/import/server3:/var/lib/neo4j/import
- ./neo4j/metrics/server3:/var/lib/neo4j/metrics
- ./neo4j/licenses/server3:/var/lib/neo4j/licenses
- ./neo4j/ssl/server3:/var/lib/neo4j/ssl
NEO4j_server_bolt_advertised_address: localhost:9687
NEO4j_server_http_advertised_address: localhost:9474

server4:
<<: *common-cluster
hostname: server4
ports:
- "7691:7687"
- "7478:7474"
- "10474:7474"
- "10473:7473"
- "10687:7687"
environment:
<<: *common-cluster-env
NEO4J_initial_server_mode__constraint: 'SECONDARY'
volumes:
- ./neo4j/neo4j-cluster.conf:/conf/neo4j.conf
- ./neo4j/data/server4:/var/lib/neo4j/data
- ./neo4j/logs/server4:/var/lib/neo4j/logs
- ./neo4j/conf/server4:/var/lib/neo4j/conf
- ./neo4j/import/server4:/var/lib/neo4j/import
- ./neo4j/metrics/server4:/var/lib/neo4j/metrics
- ./neo4j/licenses/server4:/var/lib/neo4j/licenses
- ./neo4j/ssl/server4:/var/lib/neo4j/ssl
NEO4j_server_bolt_advertised_address: localhost:10687
NEO4j_server_http_advertised_address: localhost:10474
2 changes: 0 additions & 2 deletions neo4j/conf/neo4j/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/conf/server1/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/conf/server2/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/conf/server3/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/conf/server4/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/data/neo4j/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/data/server1/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/data/server2/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/data/server3/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions neo4j/data/server4/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/import/neo4j/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/import/server1/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/import/server2/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/import/server3/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/import/server4/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/licenses/neo4j/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/licenses/server1/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/licenses/server2/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/licenses/server3/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/licenses/server4/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/logs/neo4j/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/logs/server1/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/logs/server2/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/logs/server3/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/logs/server4/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/metrics/neo4j/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/metrics/server1/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/metrics/server2/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/metrics/server3/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions neo4j/metrics/server4/.gitignore

This file was deleted.

35 changes: 0 additions & 35 deletions neo4j/neo4j-cluster.conf

This file was deleted.

Loading

0 comments on commit 2db9df8

Please sign in to comment.