Merge branch 'extractTools' into 'main'
remove db from service --check See merge request v3/service/territory!11
This commit is contained in:
commit
2f501b796e
|
@ -4,7 +4,7 @@ SERVICE_PORT=5004
|
||||||
SERVICE_CONFIGURATION_DOMAIN=TERRITORY
|
SERVICE_CONFIGURATION_DOMAIN=TERRITORY
|
||||||
|
|
||||||
# PRISMA
|
# 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
|
# RABBIT MQ
|
||||||
RMQ_URI=amqp://v3-broker:5672
|
RMQ_URI=amqp://v3-broker:5672
|
||||||
|
@ -14,8 +14,8 @@ RMQ_EXCHANGE=mobicoop
|
||||||
POSTGRES_IMAGE=postgis/postgis:15-3.3
|
POSTGRES_IMAGE=postgis/postgis:15-3.3
|
||||||
|
|
||||||
# REDIS
|
# REDIS
|
||||||
REDIS_IMAGE=redis:7.0-alpine
|
REDIS_HOST=v3-redis
|
||||||
REDIS_HOST=v3-territory-redis
|
REDIS_PASSWORD=redis
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
|
|
||||||
# CACHE
|
# CACHE
|
||||||
|
|
|
@ -4,7 +4,4 @@ SERVICE_PORT=5004
|
||||||
SERVICE_CONFIGURATION_DOMAIN=TERRITORY
|
SERVICE_CONFIGURATION_DOMAIN=TERRITORY
|
||||||
|
|
||||||
# PRISMA
|
# PRISMA
|
||||||
DATABASE_URL="postgresql://territory:territory@localhost:5604/territory?schema=public"
|
DATABASE_URL="postgresql://mobicoop:mobicoop@localhost:5432/mobicoop-test?schema=territory"
|
||||||
|
|
||||||
# POSTGRES
|
|
||||||
POSTGRES_IMAGE=postgis/postgis:15-3.3
|
|
||||||
|
|
|
@ -3,18 +3,13 @@ SERVICE_URL=0.0.0.0
|
||||||
SERVICE_PORT=5004
|
SERVICE_PORT=5004
|
||||||
|
|
||||||
# PRISMA
|
# 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
|
# RABBIT MQ
|
||||||
RMQ_URI=amqp://v3-territory-broker:5672
|
RMQ_URI=amqp://v3-broker:5672
|
||||||
|
|
||||||
# MESSAGE BROKER
|
# MESSAGE BROKER
|
||||||
BROKER_IMAGE=rabbitmq:3-alpine
|
BROKER_IMAGE=rabbitmq:3-alpine
|
||||||
|
|
||||||
# POSTGRES
|
# POSTGRES
|
||||||
POSTGRES_IMAGE=postgis/postgis:15-3.3
|
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
|
#!/bin/bash
|
||||||
testlog() {
|
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
|
testlog 2> /dev/null
|
||||||
|
|
|
@ -1,30 +1,20 @@
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
v3-territory-redis:
|
db:
|
||||||
container_name: v3-territory-redis
|
container_name: v3-db
|
||||||
image: ${REDIS_IMAGE}
|
|
||||||
ports:
|
|
||||||
- 6504:6379
|
|
||||||
env_file:
|
|
||||||
- ci/.env.ci
|
|
||||||
networks:
|
|
||||||
- v3-network
|
|
||||||
|
|
||||||
v3-territory-db-test:
|
|
||||||
container_name: v3-territory-db-test
|
|
||||||
image: ${POSTGRES_IMAGE}
|
image: ${POSTGRES_IMAGE}
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: territory
|
POSTGRES_DB: mobicoop
|
||||||
POSTGRES_USER: territory
|
POSTGRES_USER: mobicoop
|
||||||
POSTGRES_PASSWORD: territory
|
POSTGRES_PASSWORD: mobicoop
|
||||||
ports:
|
ports:
|
||||||
- 5604:5432
|
- 5432:5432
|
||||||
networks:
|
networks:
|
||||||
- v3-network
|
- v3-network
|
||||||
|
|
||||||
v3-territory-broker:
|
broker:
|
||||||
container_name: v3-territory-broker
|
container_name: v3-broker
|
||||||
image: ${BROKER_IMAGE}
|
image: ${BROKER_IMAGE}
|
||||||
ports:
|
ports:
|
||||||
- 5672:5672
|
- 5672:5672
|
||||||
|
|
|
@ -2,7 +2,7 @@ version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
v3-territory-api:
|
v3-territory-api:
|
||||||
container_name: v3-territory
|
container_name: v3-territory-api
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
context: .
|
context: .
|
||||||
|
@ -14,57 +14,11 @@ services:
|
||||||
command: npm run start:dev
|
command: npm run start:dev
|
||||||
ports:
|
ports:
|
||||||
- ${SERVICE_PORT:-5004}:${SERVICE_PORT:-5004}
|
- ${SERVICE_PORT:-5004}:${SERVICE_PORT:-5004}
|
||||||
depends_on:
|
|
||||||
- v3-territory-db
|
|
||||||
networks:
|
networks:
|
||||||
v3-network:
|
v3-network:
|
||||||
aliases:
|
aliases:
|
||||||
- v3-territory-api
|
- 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:
|
networks:
|
||||||
v3-network:
|
v3-network:
|
||||||
name: v3-network
|
name: v3-network
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
-- CreateExtension
|
-- CreateExtension
|
||||||
CREATE EXTENSION IF NOT EXISTS "postgis";
|
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
|
-- CreateTable
|
||||||
CREATE TABLE "territory" (
|
CREATE TABLE "territory" (
|
||||||
"uuid" UUID NOT NULL,
|
"uuid" UUID NOT NULL,
|
||||||
|
|
Loading…
Reference in New Issue