From b9d6d88a9a3d1cd54c621d3170edfdee18b95a41 Mon Sep 17 00:00:00 2001 From: sbriat Date: Tue, 28 Feb 2023 10:56:39 +0100 Subject: [PATCH] clean compose --- .gitlab-ci.yml | 2 +- ci/.env.ci | 4 ++-- docker-compose.ci.service.yml | 4 ++-- docker-compose.ci.tools.yml | 6 +++--- docker-compose.yml | 8 ++++---- package.json | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b4607ee..4f5144b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ test: - docker-compose -f docker-compose.ci.tools.yml -p configuration-tools --env-file ci/.env.ci up -d - sh ci/wait-up.sh - docker-compose -f docker-compose.ci.service.yml -p configuration-service --env-file ci/.env.ci up -d - - docker exec -t v3-configuration sh -c "npm run test:integration:ci" + - docker exec -t v3-configuration-api sh -c "npm run test:integration:ci" coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/ rules: - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' diff --git a/ci/.env.ci b/ci/.env.ci index 464101c..5351dcd 100644 --- a/ci/.env.ci +++ b/ci/.env.ci @@ -3,10 +3,10 @@ SERVICE_URL=0.0.0.0 SERVICE_PORT=5003 # PRISMA -DATABASE_URL="postgresql://configuration:configuration@db:5432/configuration?schema=public" +DATABASE_URL="postgresql://configuration:configuration@v3-configuration-db-test:5432/configuration?schema=public" # RABBIT MQ -RMQ_URI=amqp://broker:5672 +RMQ_URI=amqp://v3-configuration-broker:5672 # MESSAGE BROKER BROKER_IMAGE=rabbitmq:3-alpine diff --git a/docker-compose.ci.service.yml b/docker-compose.ci.service.yml index 6652025..2cd43fd 100644 --- a/docker-compose.ci.service.yml +++ b/docker-compose.ci.service.yml @@ -1,8 +1,8 @@ version: '3.8' services: - api: - container_name: v3-configuration + v3-configuration-api: + container_name: v3-configuration-api build: dockerfile: ci/Dockerfile context: . diff --git a/docker-compose.ci.tools.yml b/docker-compose.ci.tools.yml index dbd9988..16a85f2 100644 --- a/docker-compose.ci.tools.yml +++ b/docker-compose.ci.tools.yml @@ -1,7 +1,7 @@ version: '3.8' services: - db: + v3-configuration-db-test: container_name: v3-configuration-db-test image: ${POSTGRES_IMAGE} environment: @@ -13,8 +13,8 @@ services: networks: - v3-network - broker: - container_name: v3-broker + v3-configuration-broker: + container_name: v3-configuration-broker image: ${BROKER_IMAGE} ports: - 5672:5672 diff --git a/docker-compose.yml b/docker-compose.yml index 7f2a7a0..15e2e45 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ version: '3.8' services: - api: - container_name: v3-configuration + v3-configuration-api: + container_name: v3-configuration-api build: dockerfile: Dockerfile context: . @@ -21,7 +21,7 @@ services: aliases: - v3-configuration-api - db: + v3-configuration-db: container_name: v3-configuration-db image: ${POSTGRES_IMAGE} environment: @@ -37,7 +37,7 @@ services: aliases: - v3-configuration-db - db-test: + v3-configuration-db-test: container_name: v3-configuration-db-test image: ${POSTGRES_IMAGE} environment: diff --git a/package.json b/package.json index ec675ef..d11b99f 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,8 @@ "test:integration:ci": "npm run migrate:test:ci && dotenv -e ci/.env.ci -- jest --testPathPattern 'tests/integration/'", "test:cov": "jest --testPathPattern 'tests/unit/' --coverage", "test:e2e": "jest --config ./test/jest-e2e.json", - "generate": "docker exec v3-configuration sh -c 'npx prisma generate'", - "migrate": "docker exec v3-configuration sh -c 'npx prisma migrate dev'", + "generate": "docker exec v3-configuration-api sh -c 'npx prisma generate'", + "migrate": "docker exec v3-configuration-api sh -c 'npx prisma migrate dev'", "migrate:test": "dotenv -e .env.test -- npx prisma migrate deploy", "migrate:test:ci": "dotenv -e ci/.env.ci -- npx prisma migrate deploy" },