Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions infra/dev/compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
api:
hostname: api
container_name: api
image: ghcr.io/task-tracker-lab/task-tracker-backend:feat-user
image: ghcr.io/task-tracker-lab/task-tracker-backend:dev
env_file:
- .env
ports:
Expand Down Expand Up @@ -45,7 +45,11 @@ services:
networks:
- backend
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" -q || exit 1']
test: [
'CMD-SHELL',
'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" -q
|| exit 1',
]
interval: 5s
timeout: 5s
retries: 5
Expand All @@ -57,7 +61,7 @@ services:
image: redis:7-alpine
restart: always
ports:
- '7000:6379'
- '${REDIS_PORT:-6999}:6379'
command: redis-server --save 60 1 --loglevel notice
volumes:
- redis_data:/data
Expand Down Expand Up @@ -99,13 +103,10 @@ services:
- backend
profiles: ['infra']
entrypoint: >
/bin/sh -c "
sleep 5;
mc alias set myminio http://minio:9000 ${S3_ACCESS_KEY} ${S3_SECRET_KEY};
mc mb myminio/${S3_BUCKET_NAME} --ignore-existing;
mc anonymous set download myminio/${S3_BUCKET_NAME};
exit 0;
"
/bin/sh -c " sleep 5; mc alias set myminio http://minio:9000
${S3_ACCESS_KEY} ${S3_SECRET_KEY}; mc mb myminio/${S3_BUCKET_NAME}
--ignore-existing; mc anonymous set download
myminio/${S3_BUCKET_NAME}; exit 0; "

volumes:
postgres_data:
Expand Down
18 changes: 12 additions & 6 deletions src/shared/error/swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,21 @@ export const ApiErrorResponse = (
schema: {
allOf: [{ $ref: getSchemaPath(GlobalErrorResponse.Output) }],
example: {
code: bizCode,
message: description,
retryable: status >= 500,
success: false,
error: {
code: bizCode,
message: description,
retryable: status >= 500,
},
details: details || [],
meta: {
requestId: 'req-clj1abc230000jk78',
request: {
requestId: 'req-clj1abc230000jk78',
path: '/api/v1/...',
method: 'POST',
ip: '127.0.0.1',
},
timestamp: new Date().toISOString(),
path: '/api/v1/...',
method: 'POST',
service: 'main-backend',
},
},
Expand Down
Loading