refactor(docker): neo4j image naming inconsistency in docker compose files (#8736)

* refactor neo4j image naming inconsistency in docker compose files

* add explicit building of neo4j image to backend preparation e2e test

* fix build target neo4j building job

* fix build target for neo4j building job

* fix naming inconsistenca in backend workflow jobs

* refactor docker compose commands in backend test workflow

* rename custom neo4j docker images according to their naming standards

* rename custom neo4j docker images according to their naming standards
This commit is contained in:
mahula 2025-06-30 11:14:21 +02:00 committed by GitHub
parent f3788b84a5
commit 3730be6414
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 10 deletions

View File

@ -32,8 +32,8 @@ jobs:
- name: Neo4J | Build 'community' image
run: |
docker build --target community -t "ocelotsocialnetwork/neo4j-community:test" neo4j/
docker save "ocelotsocialnetwork/neo4j-community:test" > /tmp/neo4j.tar
docker compose -f docker-compose.yml -f docker-compose.test.yml build neo4j
docker save "ghcr.io/ocelot-social-community/ocelot-social/neo4j:community" > /tmp/neo4j.tar
- name: Cache docker images
id: cache-neo4j
@ -53,8 +53,8 @@ jobs:
- name: backend | Build 'test' image
run: |
docker build --target test -t "ocelotsocialnetwork/backend:test" backend/
docker save "ocelotsocialnetwork/backend:test" > /tmp/backend.tar
docker compose -f docker-compose.yml -f docker-compose.test.yml build backend
docker save "ghcr.io/ocelot-social-community/ocelot-social/backend:test" > /tmp/backend.tar
- name: Cache docker images
id: cache-backend
@ -112,8 +112,7 @@ jobs:
cp backend/.env.template backend/.env
- name: backend | docker compose
# doesn't work without the --build flag - this either means we should not load the cached images or cache the correct image
run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach backend --build
run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach backend
- name: backend | Initialize Database
run: docker compose exec -T backend yarn db:migrate init

View File

@ -18,11 +18,11 @@ jobs:
- name: Build backend and dependencies
run: |
# Build and start all required images for backend
docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach backend --build
docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach neo4j backend --build
# Save the build images
docker save "ghcr.io/ocelot-social-community/ocelot-social/backend:test" > /tmp/backend.tar
docker save "ghcr.io/ocelot-social-community/ocelot-social/neo4j-community:test" > /tmp/neo4j.tar
docker save "ghcr.io/ocelot-social-community/ocelot-social/neo4j:community" > /tmp/neo4j.tar
docker save "quay.io/minio/minio:latest" > /tmp/minio.tar
docker save "quay.io/minio/mc:latest" > /tmp/minio-mc.tar
docker save "maildev/maildev:latest" > /tmp/mailserver.tar

View File

@ -35,7 +35,10 @@ services:
neo4j:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: ghcr.io/ocelot-social-community/ocelot-social/neo4j-community:test
image: ghcr.io/ocelot-social-community/ocelot-social/neo4j:community
build:
context: ./neo4j
target: community
#environment:
# - NEO4J_dbms_connector_bolt_enabled=true
# - NEO4J_dbms_connector_bolt_tls__level=OPTIONAL

View File

@ -75,7 +75,7 @@ services:
- 3001:80
neo4j:
image: ghcr.io/ocelot-social-community/ocelot-social/neo4j
image: ghcr.io/ocelot-social-community/ocelot-social/neo4j:community
build:
context: ./neo4j
# community edition 👆🏼, because we have no enterprise licence 👇🏼 at the moment