Merge branch 'extractTools' into 'main'

simplify test ci --check

See merge request v3/service/configuration!15
This commit is contained in:
Sylvain Briat 2023-03-17 10:42:31 +00:00
commit b98bf4b697
6 changed files with 13 additions and 51 deletions

View File

@ -3,11 +3,8 @@ SERVICE_URL=0.0.0.0
SERVICE_PORT=5003 SERVICE_PORT=5003
# PRISMA # PRISMA
DATABASE_URL="postgresql://configuration:configuration@v3-configuration-db:5432/configuration?schema=public" DATABASE_URL="postgresql://mobicoop:mobicoop@v3-db:5432/mobicoop?schema=configuration"
# RABBIT MQ # RABBIT MQ
RMQ_URI=amqp://v3-broker:5672 RMQ_URI=amqp://v3-broker:5672
RMQ_EXCHANGE=mobicoop RMQ_EXCHANGE=mobicoop
# POSTGRES
POSTGRES_IMAGE=postgres:15.0

View File

@ -3,7 +3,4 @@ SERVICE_URL=0.0.0.0
SERVICE_PORT=5003 SERVICE_PORT=5003
# PRISMA # PRISMA
DATABASE_URL="postgresql://configuration:configuration@localhost:5603/configuration?schema=public" DATABASE_URL="postgresql://mobicoop:mobicoop@localhost:5432/mobicoop?schema=configuration-test"
# POSTGRES
POSTGRES_IMAGE=postgres:15.0

View File

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

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
testlog() { testlog() {
docker logs v3-configuration-db-test | grep -q "database system is ready to accept connections" docker logs v3-db | grep -q "database system is ready to accept connections"
} }
testlog 2> /dev/null testlog 2> /dev/null

View File

@ -1,20 +1,20 @@
version: '3.8' version: '3.8'
services: services:
v3-configuration-db-test: db:
container_name: v3-configuration-db-test container_name: v3-db
image: ${POSTGRES_IMAGE} image: ${POSTGRES_IMAGE}
environment: environment:
POSTGRES_DB: configuration POSTGRES_DB: mobicoop
POSTGRES_USER: configuration POSTGRES_USER: mobicoop
POSTGRES_PASSWORD: configuration POSTGRES_PASSWORD: mobicoop
ports: ports:
- 5603:5432 - 5432:5432
networks: networks:
- v3-network - v3-network
v3-configuration-broker: broker:
container_name: v3-configuration-broker container_name: v3-broker
image: ${BROKER_IMAGE} image: ${BROKER_IMAGE}
ports: ports:
- 5672:5672 - 5672:5672

View File

@ -14,43 +14,11 @@ services:
command: npm run start:dev command: npm run start:dev
ports: ports:
- ${SERVICE_PORT:-5003}:${SERVICE_PORT:-5003} - ${SERVICE_PORT:-5003}:${SERVICE_PORT:-5003}
depends_on:
- v3-configuration-db
networks: networks:
v3-network: v3-network:
aliases: aliases:
- v3-configuration-api - v3-configuration-api
v3-configuration-db:
container_name: v3-configuration-db
image: ${POSTGRES_IMAGE}
environment:
POSTGRES_DB: configuration
POSTGRES_USER: configuration
POSTGRES_PASSWORD: configuration
ports:
- 5503:5432
volumes:
- .postgresql:/var/lib/postgresql/data:rw
networks:
v3-network:
aliases:
- v3-configuration-db
v3-configuration-db-test:
container_name: v3-configuration-db-test
image: ${POSTGRES_IMAGE}
environment:
POSTGRES_DB: configuration
POSTGRES_USER: configuration
POSTGRES_PASSWORD: configuration
ports:
- 5603:5432
networks:
v3-network:
aliases:
- v3-configuration-db-test
networks: networks:
v3-network: v3-network:
name: v3-network name: v3-network