forked from mtusi2026/mtusi2026lab5
Перенесено дерево lab4 целиком: NestJS-приложение с вложениями и S3,
Dockerfile, compose.yaml, infra/{haproxy,minio}, стендовые скрипты,
scripts/lab4, evidence/lab4 и contracts/extensions.openapi.json.
Задание lab5 оставлено своим: README, REPORT, COURSE, lab.json,
contracts/{openapi,infrastructure,jobs.schema,attachment-states,examples},
tests, compose.example.yaml, .github/pull_request_template.md.
Адаптации при переносе:
- docker-проект mtusi-lab4 -> mtusi-lab5 и тег образа mtusi-messenger:lab5,
чтобы тома и контейнеры не пересекались с lab4 (scripts/stop-one.sh:
LAB_PROJECT вместо LAB4_PROJECT);
- Makefile: цели lab5 сохранены, добавлены стендовые (stand-up/down,
wait-ready, init-env, test-e2e, test-dependencies, s3-security,
consistency, bench);
- .env.example: реальные переменные приложения и стенда lab4 (без них
compose.yaml не поднимается) + блок lab5 (BROKER_URL_FILE, WORKER_*).
18 lines
380 B
TypeScript
18 lines
380 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
import { HealthService } from './health.service.js';
|
|
|
|
@Controller('health')
|
|
export class HealthController {
|
|
constructor(private readonly healthService: HealthService) {}
|
|
|
|
@Get('live')
|
|
getLive() {
|
|
return this.healthService.getLiveness();
|
|
}
|
|
|
|
@Get('ready')
|
|
async getReady() {
|
|
return this.healthService.getReadiness();
|
|
}
|
|
}
|