diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index a7eff0ef2..cc101cae3 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -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 diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index a0f9488cd..f334c6155 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -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 diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 67645ad87..1189d3fa6 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 4a1e9e951..775f60feb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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