Merge branch 'updateCompose' into 'main'
clean compose See merge request v3/service/auth!16
This commit is contained in:
commit
d847d6202a
|
@ -13,4 +13,4 @@ POSTGRES_IMAGE=postgres:15.0
|
||||||
|
|
||||||
# OPA
|
# OPA
|
||||||
OPA_IMAGE=openpolicyagent/opa:0.48.0-rootless
|
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/
|
||||||
|
|
|
@ -13,4 +13,4 @@ POSTGRES_IMAGE=postgres:15.0
|
||||||
|
|
||||||
# OPA
|
# OPA
|
||||||
OPA_IMAGE=openpolicyagent/opa:0.48.0-rootless
|
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/
|
||||||
|
|
|
@ -19,7 +19,7 @@ test:
|
||||||
- docker-compose -f docker-compose.ci.tools.yml -p auth-tools --env-file ci/.env.ci up -d
|
- docker-compose -f docker-compose.ci.tools.yml -p auth-tools --env-file ci/.env.ci up -d
|
||||||
- sh ci/wait-up.sh
|
- sh ci/wait-up.sh
|
||||||
- docker-compose -f docker-compose.ci.service.yml -p auth-service --env-file ci/.env.ci up -d
|
- 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\.]+)/
|
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
||||||
|
|
|
@ -3,7 +3,7 @@ SERVICE_URL=0.0.0.0
|
||||||
SERVICE_PORT=5002
|
SERVICE_PORT=5002
|
||||||
|
|
||||||
# PRISMA
|
# PRISMA
|
||||||
DATABASE_URL="postgresql://auth:auth@db:5432/auth?schema=public"
|
DATABASE_URL="postgresql://auth:auth@v3-auth-db-test:5432/auth?schema=public"
|
||||||
|
|
||||||
# RABBIT MQ
|
# RABBIT MQ
|
||||||
RMQ_URI=amqp://broker:5672
|
RMQ_URI=amqp://broker:5672
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
api:
|
v3-auth-api:
|
||||||
container_name: v3-auth
|
container_name: v3-auth-api
|
||||||
build:
|
build:
|
||||||
dockerfile: ci/Dockerfile
|
dockerfile: ci/Dockerfile
|
||||||
context: .
|
context: .
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
db:
|
v3-auth-db-test:
|
||||||
container_name: v3-auth-db-test
|
container_name: v3-auth-db-test
|
||||||
image: ${POSTGRES_IMAGE}
|
image: ${POSTGRES_IMAGE}
|
||||||
environment:
|
environment:
|
||||||
|
@ -13,8 +13,8 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- v3-network
|
- v3-network
|
||||||
|
|
||||||
broker:
|
v3-auth-broker:
|
||||||
container_name: v3-broker
|
container_name: v3-auth-broker
|
||||||
image: ${BROKER_IMAGE}
|
image: ${BROKER_IMAGE}
|
||||||
ports:
|
ports:
|
||||||
- 5672:5672
|
- 5672:5672
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
api:
|
v3-auth-api:
|
||||||
container_name: v3-auth
|
container_name: v3-auth-api
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
context: .
|
context: .
|
||||||
|
@ -21,7 +21,7 @@ services:
|
||||||
aliases:
|
aliases:
|
||||||
- v3-auth-api
|
- v3-auth-api
|
||||||
|
|
||||||
db:
|
v3-auth-db:
|
||||||
container_name: v3-auth-db
|
container_name: v3-auth-db
|
||||||
image: ${POSTGRES_IMAGE}
|
image: ${POSTGRES_IMAGE}
|
||||||
environment:
|
environment:
|
||||||
|
@ -37,7 +37,7 @@ services:
|
||||||
aliases:
|
aliases:
|
||||||
- v3-auth-db
|
- v3-auth-db
|
||||||
|
|
||||||
db-test:
|
v3-auth-db-test:
|
||||||
container_name: v3-auth-db-test
|
container_name: v3-auth-db-test
|
||||||
image: ${POSTGRES_IMAGE}
|
image: ${POSTGRES_IMAGE}
|
||||||
environment:
|
environment:
|
||||||
|
@ -51,26 +51,25 @@ services:
|
||||||
aliases:
|
aliases:
|
||||||
- v3-auth-db-test
|
- v3-auth-db-test
|
||||||
|
|
||||||
opa:
|
v3-auth-opa:
|
||||||
container_name: v3-opa
|
container_name: v3-auth-opa
|
||||||
image: ${OPA_IMAGE}
|
image: ${OPA_IMAGE}
|
||||||
ports:
|
ports:
|
||||||
- 8181:8181
|
- 8181:8181
|
||||||
command:
|
command:
|
||||||
- "run"
|
- 'run'
|
||||||
- "--server"
|
- '--server'
|
||||||
- "--log-format=json-pretty"
|
- '--log-format=json-pretty'
|
||||||
- "--set=decision_logs.console=true"
|
- '--set=decision_logs.console=true'
|
||||||
- "./policies/"
|
- './policies/'
|
||||||
volumes:
|
volumes:
|
||||||
- ./opa:/policies
|
- ./opa:/policies
|
||||||
networks:
|
networks:
|
||||||
v3-network:
|
v3-network:
|
||||||
aliases:
|
aliases:
|
||||||
- v3-opa
|
- v3-auth-opa
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
v3-network:
|
v3-network:
|
||||||
name: v3-network
|
name: v3-network
|
||||||
external: true
|
external: true
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"test:integration:ci": "npm run migrate:test:ci && dotenv -e ci/.env.ci -- jest --testPathPattern 'tests/integration/'",
|
"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:cov": "jest --testPathPattern 'tests/unit/' --coverage",
|
||||||
"test:e2e": "jest --config ./test/jest-e2e.json",
|
"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": "dotenv -e .env.test -- npx prisma migrate deploy",
|
||||||
"migrate:test:ci": "dotenv -e ci/.env.ci -- npx prisma migrate deploy"
|
"migrate:test:ci": "dotenv -e ci/.env.ci -- npx prisma migrate deploy"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue