clean compose

This commit is contained in:
sbriat 2023-02-28 11:19:28 +01:00
parent e060c9c548
commit bdb176ca73
6 changed files with 16 additions and 16 deletions

View File

@ -19,7 +19,7 @@ test:
- docker-compose -f docker-compose.ci.tools.yml -p user-tools --env-file ci/.env.ci up -d
- sh ci/wait-up.sh
- docker-compose -f docker-compose.ci.service.yml -p user-service --env-file ci/.env.ci up -d
- docker exec -t v3-user sh -c "npm run test:integration:ci"
- docker exec -t v3-user-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'

View File

@ -3,10 +3,10 @@ SERVICE_URL=0.0.0.0
SERVICE_PORT=5001
# PRISMA
DATABASE_URL="postgresql://user:user@db:5432/user?schema=public"
DATABASE_URL="postgresql://user:user@v3-user-db-test:5432/user?schema=public"
# RABBIT MQ
RMQ_URI=amqp://broker:5672
RMQ_URI=amqp://v3-user-broker:5672
# MESSAGE BROKER
BROKER_IMAGE=rabbitmq:3-alpine

View File

@ -1,8 +1,8 @@
version: '3.8'
services:
api:
container_name: v3-user
v3-user-api:
container_name: v3-user-api
build:
dockerfile: ci/Dockerfile
context: .

View File

@ -1,7 +1,7 @@
version: '3.8'
services:
redis:
v3-user-redis:
container_name: v3-user-redis
image: ${REDIS_IMAGE}
ports:
@ -11,7 +11,7 @@ services:
networks:
- v3-network
db:
v3-user-db-test:
container_name: v3-user-db-test
image: ${POSTGRES_IMAGE}
environment:
@ -23,8 +23,8 @@ services:
networks:
- v3-network
broker:
container_name: v3-broker
v3-user-broker:
container_name: v3-user-broker
image: ${BROKER_IMAGE}
ports:
- 5672:5672

View File

@ -1,8 +1,8 @@
version: '3.8'
services:
api:
container_name: v3-user
v3-user-api:
container_name: v3-user-api
build:
dockerfile: Dockerfile
context: .
@ -21,7 +21,7 @@ services:
aliases:
- v3-user-api
redis:
v3-user-redis:
container_name: v3-user-redis
image: ${REDIS_IMAGE}
ports:
@ -35,7 +35,7 @@ services:
aliases:
- v3-user-redis
db:
v3-user-db:
container_name: v3-user-db
image: ${POSTGRES_IMAGE}
environment:
@ -51,7 +51,7 @@ services:
aliases:
- v3-user-db
db-test:
v3-user-db-test:
container_name: v3-user-db-test
image: ${POSTGRES_IMAGE}
environment:

View File

@ -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-user sh -c 'npx prisma generate'",
"migrate": "docker exec v3-user sh -c 'npx prisma migrate dev'",
"generate": "docker exec v3-user-api sh -c 'npx prisma generate'",
"migrate": "docker exec v3-user-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"
},