Compare commits
10 Commits
cors
...
3bf4cebbe6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bf4cebbe6 | ||
|
|
907c24c45b | ||
|
|
b057ea154a | ||
|
|
0e2a7eeeec | ||
|
|
c702946393 | ||
|
|
5260b8a9c5 | ||
|
|
30bd7a0d28 | ||
| 32ea0d7c4d | |||
| c22d1b5b8c | |||
| 15fe566d53 |
19
docker-compose.dev.yml
Normal file
19
docker-compose.dev.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
services:
|
||||
drill-cloud-v3-dev:
|
||||
container_name: container-drill-cloud-v3${branch:+-${branch}}
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: ${PORT}
|
||||
DATABASE_URL: ${DATABASE_URL}
|
||||
INGEST_API_KEY: ${INGEST_API_KEY}
|
||||
CURRENT_EVENTS_POLL_MS: ${CURRENT_EVENTS_POLL_MS}
|
||||
expose:
|
||||
- "3101"
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
drill-cloud-v3:
|
||||
container_name: drill-cloud-v3${branch:+-${branch}}
|
||||
container_name: container-drill-cloud-v3${branch:+-${branch}}
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
|
||||
@@ -9,15 +9,16 @@ import { IngestService } from './ingest.service';
|
||||
export class IngestController {
|
||||
constructor(private readonly ingest: IngestService) {}
|
||||
|
||||
/** Принимает одну сырую точку и сохраняет ее как запись истории/current. */
|
||||
@Post()
|
||||
ingestPoint(@Body() point: IngestPointDto) {
|
||||
return this.ingest.ingestPoint(point);
|
||||
}
|
||||
|
||||
/** Принимает компактное тело запроса по edge и сохраняет каждое значение построчно. */
|
||||
@Post(':edge')
|
||||
ingestEdgeValues(@Param('edge') edge: string, @Body() body: IngestEdgeValuesDto) {
|
||||
ingestEdgeValues(
|
||||
@Param('edge') edge: string,
|
||||
@Body() body: IngestEdgeValuesDto,
|
||||
) {
|
||||
const points = Object.entries(body.values).map(([tag, value]) => ({
|
||||
edge,
|
||||
tag,
|
||||
|
||||
@@ -3,7 +3,6 @@ import { NestFactory } from '@nestjs/core';
|
||||
import compression from 'compression';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
/** Запускает HTTP API со сжатием и глобальной валидацией DTO. */
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
app.use(compression());
|
||||
|
||||
Reference in New Issue
Block a user