diff --git a/.env.dist b/.env.dist index e55ee74..4b27c80 100644 --- a/.env.dist +++ b/.env.dist @@ -13,4 +13,4 @@ POSTGRES_IMAGE=postgres:15.0 # OPA OPA_IMAGE=openpolicyagent/opa:0.48.0-rootless -OPA_URL=http://v3-opa:8181/v1/data/ +OPA_URL=http://v3-auth-opa:8181/v1/data/ diff --git a/.env.test b/.env.test index 00231b0..73b84ba 100644 --- a/.env.test +++ b/.env.test @@ -13,4 +13,4 @@ POSTGRES_IMAGE=postgres:15.0 # OPA OPA_IMAGE=openpolicyagent/opa:0.48.0-rootless -OPA_URL=http://v3-opa:8181/v1/data/ +OPA_URL=http://v3-auth-opa:8181/v1/data/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c39240b..406ae1f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ test: - docker-compose -f docker-compose.ci.tools.yml -p auth-tools --env-file ci/.env.ci up -d - sh ci/wait-up.sh - docker-compose -f docker-compose.ci.service.yml -p auth-service --env-file ci/.env.ci up -d - - docker exec -t v3-auth sh -c "npm run test:integration:ci" + - docker exec -t v3-auth-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/docker-compose.ci.service.yml b/docker-compose.ci.service.yml index dfdb432..410f4db 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-auth + v3-auth-api: + container_name: v3-auth-api build: dockerfile: ci/Dockerfile context: . diff --git a/docker-compose.ci.tools.yml b/docker-compose.ci.tools.yml index c8c83c9..76467ec 100644 --- a/docker-compose.ci.tools.yml +++ b/docker-compose.ci.tools.yml @@ -1,7 +1,7 @@ version: '3.8' services: - db: + v3-auth-db-test: container_name: v3-auth-db-test image: ${POSTGRES_IMAGE} environment: @@ -13,7 +13,7 @@ services: networks: - v3-network - broker: + v3-auth-broker: container_name: v3-broker image: ${BROKER_IMAGE} ports: diff --git a/docker-compose.yml b/docker-compose.yml index eafe3e2..2529baa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ version: '3.8' services: - api: - container_name: v3-auth + v3-auth-api: + container_name: v3-auth-api build: dockerfile: Dockerfile context: . @@ -21,7 +21,7 @@ services: aliases: - v3-auth-api - db: + v3-auth-db: container_name: v3-auth-db image: ${POSTGRES_IMAGE} environment: @@ -37,7 +37,7 @@ services: aliases: - v3-auth-db - db-test: + v3-auth-db-test: container_name: v3-auth-db-test image: ${POSTGRES_IMAGE} environment: @@ -51,26 +51,25 @@ services: aliases: - v3-auth-db-test - opa: - container_name: v3-opa + v3-auth-opa: + container_name: v3-auth-opa image: ${OPA_IMAGE} ports: - 8181:8181 command: - - "run" - - "--server" - - "--log-format=json-pretty" - - "--set=decision_logs.console=true" - - "./policies/" + - 'run' + - '--server' + - '--log-format=json-pretty' + - '--set=decision_logs.console=true' + - './policies/' volumes: - ./opa:/policies networks: v3-network: aliases: - - v3-opa + - v3-auth-opa networks: v3-network: name: v3-network external: true - diff --git a/package.json b/package.json index 7591906..72ebbb3 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "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", - "migrate": "docker exec v3-auth sh -c 'npx prisma migrate dev'", + "migrate": "docker exec v3-auth-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" },