Merge branch 'updateCompose' into 'main'

clean compose

See merge request v3/service/territory!7
This commit is contained in:
Sylvain Briat 2023-02-28 10:19:16 +00:00
commit bff47e6eb9
6 changed files with 15 additions and 15 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
version: '3.8' version: '3.8'
services: services:
api: v3-territory-api:
container_name: v3-territory container_name: v3-territory
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
@ -21,7 +21,7 @@ services:
aliases: aliases:
- v3-territory-api - v3-territory-api
redis: v3-territory-redis:
container_name: v3-territory-redis container_name: v3-territory-redis
image: ${REDIS_IMAGE} image: ${REDIS_IMAGE}
ports: ports:
@ -35,7 +35,7 @@ services:
aliases: aliases:
- v3-territory-redis - v3-territory-redis
db: v3-territory-db:
container_name: v3-territory-db container_name: v3-territory-db
image: ${POSTGRES_IMAGE} image: ${POSTGRES_IMAGE}
environment: environment:
@ -51,7 +51,7 @@ services:
aliases: aliases:
- v3-territory-db - v3-territory-db
db-test: v3-territory-db-test:
container_name: v3-territory-db-test container_name: v3-territory-db-test
image: ${POSTGRES_IMAGE} image: ${POSTGRES_IMAGE}
environment: 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: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",
"generate": "docker exec v3-territory sh -c 'npx prisma generate'", "generate": "docker exec v3-territory-api sh -c 'npx prisma generate'",
"migrate": "docker exec v3-territory sh -c 'npx prisma migrate dev'", "migrate": "docker exec v3-territory-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"
}, },