diff --git a/.env.test b/.env.test index 80aa66e..f3790b9 100644 --- a/.env.test +++ b/.env.test @@ -7,7 +7,6 @@ DATABASE_URL="postgresql://user:user@localhost:5601/user?schema=public" # RABBIT MQ RMQ_URI=amqp://v3-broker:5672 -BROKER_IMAGE=rabbitmq:3-management # POSTGRES POSTGRES_IMAGE=postgres:15.0 diff --git a/ci/wait-up.sh b/ci/wait-up.sh index 88198a4..33b1e4b 100644 --- a/ci/wait-up.sh +++ b/ci/wait-up.sh @@ -1,6 +1,6 @@ #!/bin/bash -while ! docker logs v3-user --tail=1 | grep -q "Nest application successfully started"; +while ! docker logs v3-user-db-test --tail=1 | grep -q "database system is ready to accept connections"; do sleep 5 - echo "Waiting for Nest to be up..." + echo "Waiting for Test DB to be up..." done diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index e674882..c27376e 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -10,6 +10,12 @@ services: - .env.test ports: - 5001:5001 + depends_on: + - db-test + networks: + v3-network: + aliases: + - v3-user-api db-test: container_name: v3-user-db-test @@ -20,10 +26,12 @@ services: POSTGRES_PASSWORD: user ports: - 5601:5432 + networks: + v3-network: + aliases: + - v3-user-db-test - broker: - container_name: v3-broker - image: ${BROKER_IMAGE} - ports: - - 5672:5672 - - 15672:15672 +networks: + v3-network: + name: v3-network + driver: bridge