-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #219 from digirati-co-uk/feature/performance
Performance
- Loading branch information
Showing
15 changed files
with
135 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
services: | ||
|
||
gateway-redis: | ||
image: redis:5-alpine | ||
|
||
shared-postgres: | ||
image: ghcr.io/digirati-co-uk/madoc-postgres:main | ||
platform: linux/amd64 | ||
environment: | ||
- POSTGRES_DB=postgres | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres_password | ||
- POSTGRES_MADOC_TS_USER=madoc_ts | ||
- POSTGRES_MADOC_TS_SCHEMA=madoc_ts | ||
- POSTGRES_MADOC_TS_PASSWORD=madoc_ts_password | ||
- POSTGRES_TASKS_API_USER=tasks_api | ||
- POSTGRES_TASKS_API_SCHEMA=tasks_api | ||
- POSTGRES_TASKS_API_PASSWORD=tasks_api_password | ||
- POSTGRES_MODELS_API_USER=models_api | ||
- POSTGRES_MODELS_API_SCHEMA=models_api | ||
- POSTGRES_MODELS_API_PASSWORD=models_api_password | ||
- POSTGRES_CONFIG_SERVICE_USER=config_service | ||
- POSTGRES_CONFIG_SERVICE_SCHEMA=config_service | ||
- POSTGRES_CONFIG_SERVICE_PASSWORD=config_service_password | ||
- POSTGRES_SEARCH_API_USER=search_api | ||
- POSTGRES_SEARCH_API_SCHEMA=search_api | ||
- POSTGRES_SEARCH_API_PASSWORD=search_api_password | ||
volumes: | ||
- shared_postgres_data:/var/lib/postgresql/data:Z | ||
ports: | ||
- "${PORTS_SHARED_POSTGRES:-5401}:5432" | ||
|
||
tasks-api: | ||
build: | ||
dockerfile: Dockerfile | ||
restart: on-failure | ||
environment: | ||
- SERVER_PORT=3000 | ||
- DATABASE_HOST=shared-postgres | ||
- DATABASE_NAME=postgres | ||
- DATABASE_PORT=5432 | ||
- DATABASE_USER=tasks_api | ||
- DATABASE_SCHEMA=tasks_api | ||
- DATABASE_PASSWORD=tasks_api_password | ||
- QUEUE_LIST=tasks-api,madoc-ts | ||
- REDIS_HOST=gateway-redis | ||
links: | ||
- shared-postgres | ||
- gateway-redis | ||
ports: | ||
- "3000:3000" | ||
|
||
volumes: | ||
# Databases | ||
shared_postgres_data: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--type-index (up) | ||
|
||
-- Create index on type column | ||
create index tasks_type_index | ||
on tasks (type); | ||
|
||
-- Create index on status column | ||
create index tasks_status_index | ||
on tasks (status); | ||
|
||
-- Crete GIN index on context column | ||
create index tasks_context_gin_index | ||
on tasks using GIN (context jsonb_ops); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--type-index (down) | ||
drop index if exists tasks_type_index; | ||
drop index if exists tasks_status_index; | ||
drop index if exists tasks_context_gin_index; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters