remove db from service --check
This commit is contained in:
parent
cdc5c62c24
commit
9077c41bc8
|
@ -4,7 +4,7 @@ SERVICE_PORT=5004
|
|||
SERVICE_CONFIGURATION_DOMAIN=TERRITORY
|
||||
|
||||
# PRISMA
|
||||
DATABASE_URL="postgresql://territory:territory@v3-territory-db:5432/territory?schema=public"
|
||||
DATABASE_URL="postgresql://mobicoop:mobicoop@v3-db:5432/mobicoop?schema=territory"
|
||||
|
||||
# RABBIT MQ
|
||||
RMQ_URI=amqp://v3-broker:5672
|
||||
|
@ -14,8 +14,8 @@ RMQ_EXCHANGE=mobicoop
|
|||
POSTGRES_IMAGE=postgis/postgis:15-3.3
|
||||
|
||||
# REDIS
|
||||
REDIS_IMAGE=redis:7.0-alpine
|
||||
REDIS_HOST=v3-territory-redis
|
||||
REDIS_HOST=v3-redis
|
||||
REDIS_PASSWORD=redis
|
||||
REDIS_PORT=6379
|
||||
|
||||
# CACHE
|
||||
|
|
|
@ -4,7 +4,4 @@ SERVICE_PORT=5004
|
|||
SERVICE_CONFIGURATION_DOMAIN=TERRITORY
|
||||
|
||||
# PRISMA
|
||||
DATABASE_URL="postgresql://territory:territory@localhost:5604/territory?schema=public"
|
||||
|
||||
# POSTGRES
|
||||
POSTGRES_IMAGE=postgis/postgis:15-3.3
|
||||
DATABASE_URL="postgresql://mobicoop:mobicoop@localhost:5432/mobicoop-test?schema=territory"
|
||||
|
|
|
@ -3,18 +3,13 @@ SERVICE_URL=0.0.0.0
|
|||
SERVICE_PORT=5004
|
||||
|
||||
# PRISMA
|
||||
DATABASE_URL="postgresql://territory:territory@v3-territory-db-test:5432/territory?schema=public"
|
||||
DATABASE_URL="postgresql://mobicoop:mobicoop@v3-db:5432/mobicoop?schema=public"
|
||||
|
||||
# RABBIT MQ
|
||||
RMQ_URI=amqp://v3-territory-broker:5672
|
||||
RMQ_URI=amqp://v3-broker:5672
|
||||
|
||||
# MESSAGE BROKER
|
||||
BROKER_IMAGE=rabbitmq:3-alpine
|
||||
|
||||
# POSTGRES
|
||||
POSTGRES_IMAGE=postgis/postgis:15-3.3
|
||||
|
||||
# REDIS
|
||||
REDIS_IMAGE=redis:7.0-alpine
|
||||
REDIS_HOST=v3-territory-redis
|
||||
REDIS_PORT=6379
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
testlog() {
|
||||
docker logs v3-territory-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
|
||||
|
|
|
@ -1,30 +1,20 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
v3-territory-redis:
|
||||
container_name: v3-territory-redis
|
||||
image: ${REDIS_IMAGE}
|
||||
ports:
|
||||
- 6504:6379
|
||||
env_file:
|
||||
- ci/.env.ci
|
||||
networks:
|
||||
- v3-network
|
||||
|
||||
v3-territory-db-test:
|
||||
container_name: v3-territory-db-test
|
||||
db:
|
||||
container_name: v3-db
|
||||
image: ${POSTGRES_IMAGE}
|
||||
environment:
|
||||
POSTGRES_DB: territory
|
||||
POSTGRES_USER: territory
|
||||
POSTGRES_PASSWORD: territory
|
||||
POSTGRES_DB: mobicoop
|
||||
POSTGRES_USER: mobicoop
|
||||
POSTGRES_PASSWORD: mobicoop
|
||||
ports:
|
||||
- 5604:5432
|
||||
- 5432:5432
|
||||
networks:
|
||||
- v3-network
|
||||
|
||||
v3-territory-broker:
|
||||
container_name: v3-territory-broker
|
||||
broker:
|
||||
container_name: v3-broker
|
||||
image: ${BROKER_IMAGE}
|
||||
ports:
|
||||
- 5672:5672
|
||||
|
|
|
@ -2,7 +2,7 @@ version: '3.8'
|
|||
|
||||
services:
|
||||
v3-territory-api:
|
||||
container_name: v3-territory
|
||||
container_name: v3-territory-api
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
|
@ -14,57 +14,11 @@ services:
|
|||
command: npm run start:dev
|
||||
ports:
|
||||
- ${SERVICE_PORT:-5004}:${SERVICE_PORT:-5004}
|
||||
depends_on:
|
||||
- v3-territory-db
|
||||
networks:
|
||||
v3-network:
|
||||
aliases:
|
||||
- v3-territory-api
|
||||
|
||||
v3-territory-redis:
|
||||
container_name: v3-territory-redis
|
||||
image: ${REDIS_IMAGE}
|
||||
ports:
|
||||
- 6504:6379
|
||||
volumes:
|
||||
- .redis_data:/data
|
||||
env_file:
|
||||
- .env
|
||||
networks:
|
||||
v3-network:
|
||||
aliases:
|
||||
- v3-territory-redis
|
||||
|
||||
v3-territory-db:
|
||||
container_name: v3-territory-db
|
||||
image: ${POSTGRES_IMAGE}
|
||||
environment:
|
||||
POSTGRES_DB: territory
|
||||
POSTGRES_USER: territory
|
||||
POSTGRES_PASSWORD: territory
|
||||
ports:
|
||||
- 5504:5432
|
||||
volumes:
|
||||
- .postgresql:/var/lib/postgresql/data:rw
|
||||
networks:
|
||||
v3-network:
|
||||
aliases:
|
||||
- v3-territory-db
|
||||
|
||||
v3-territory-db-test:
|
||||
container_name: v3-territory-db-test
|
||||
image: ${POSTGRES_IMAGE}
|
||||
environment:
|
||||
POSTGRES_DB: territory
|
||||
POSTGRES_USER: territory
|
||||
POSTGRES_PASSWORD: territory
|
||||
ports:
|
||||
- 5604:5432
|
||||
networks:
|
||||
v3-network:
|
||||
aliases:
|
||||
- v3-territory-db-test
|
||||
|
||||
networks:
|
||||
v3-network:
|
||||
name: v3-network
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
-- CreateExtension
|
||||
CREATE EXTENSION IF NOT EXISTS "postgis";
|
||||
|
||||
-- Required to use postgis extension :
|
||||
-- set the search_path to both public (where is postgis) AND the current schema
|
||||
SET search_path TO territory, public;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "territory" (
|
||||
"uuid" UUID NOT NULL,
|
||||
|
|
Loading…
Reference in New Issue