diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..f70dd75 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 1696663237589 + + + + + + \ No newline at end of file diff --git a/weather_platform/.env b/weather_platform/.env index 57c7868..6ea5b18 100644 --- a/weather_platform/.env +++ b/weather_platform/.env @@ -2,6 +2,7 @@ AGW_PORT=8045 SENSORS_SERVICE_PORT=8046 AGREGATORS_SERVICE_PORT=8047 MEASURES_SERVICE_PORT=8048 +PORT=8080 AGREGATORS_SOURCE_URL=postgresql://user2235:atlantium@localhost:5441/agregators SENSORS_SOURCE_URL=postgresql://user2235:atlantium@localhost:5440/sensors MEASURES_SOURCE_URL=postgresql://user2235:atlantium@localhost:5442/measures diff --git a/weather_platform/README.md b/weather_platform/README.md index ba10ef4..878de75 100644 --- a/weather_platform/README.md +++ b/weather_platform/README.md @@ -66,51 +66,12 @@ copy .env.example .env ``` ```bash -cd apps/matrix-events-registry/docker && docker-compose up -d -``` -```bash -cd apps/matrix-registry/docker && docker-compose up -d -``` -```bash -cd apps/labs/docker && docker-compose up -d -``` -```bash -cd apps/labs/docker && docker-compose up -d -``` - -[Matrix Registry Service](/apps/matrix-registry) -```bash -prisma db push --schema="./libs/prisma-clients/matrix-device-registry/prisma/schema.prisma" -``` - -```bash -prisma generate --schema="./libs/prisma-clients/matrix-device-registry/prisma/schema.prisma" -``` - -[Matrix Events Registry Service](/apps/matrix-events-registry) -```bash -prisma db push --schema="./libs/prisma-clients/matrix-events/prisma/schema.prisma" -``` - -```bash -prisma generate --schema="./libs/prisma-clients/matrix-events/prisma/schema.prisma" -``` - -```bash -prisma db push --schema="./libs/prisma-clients/labs/prisma/schema.prisma" -``` - -```bash -prisma generate --schema="./libs/prisma-clients/labs/prisma/schema.prisma" -``` - -```bash -nx run py-multy-agent-interpreter:serve -``` +docker-compose up -d +``` Run all services: ```bash -nx run-many --parallel --target=serve --projects=frontend,agw,matrix-registry,matrix-events-registry,labs +nx run-many --parallel --target=serve --projects=crud,agw,agregators-service,measures-service,sensors-service ``` diff --git a/weather_platform/apps/agregators-service/src/main.ts b/weather_platform/apps/agregators-service/src/main.ts index 7b45f27..fff2934 100644 --- a/weather_platform/apps/agregators-service/src/main.ts +++ b/weather_platform/apps/agregators-service/src/main.ts @@ -27,7 +27,7 @@ async function bootstrap() { app.enableCors(); await app.listen(port); Logger.log( - `🚀 Application is running on: http://localhost:${port}/${globalPrefix}` + `🚀 Agregators Service is running on: http://localhost:${port}/${globalPrefix}` ); } diff --git a/weather_platform/apps/agw/src/main.ts b/weather_platform/apps/agw/src/main.ts index 8eedc80..9f172be 100644 --- a/weather_platform/apps/agw/src/main.ts +++ b/weather_platform/apps/agw/src/main.ts @@ -27,7 +27,7 @@ async function bootstrap() { app.enableCors(); await app.listen(port); Logger.log( - `🚀 Application is running on: http://localhost:${port}/${globalPrefix}` + `🚀 AGW is running on: http://localhost:${port}/${globalPrefix}` ); } diff --git a/weather_platform/apps/crud/proxy.conf.json b/weather_platform/apps/crud/proxy.conf.json index 63dd627..98ef58c 100644 --- a/weather_platform/apps/crud/proxy.conf.json +++ b/weather_platform/apps/crud/proxy.conf.json @@ -1,6 +1,6 @@ { "/api": { - "target": "http://localhost:3000", + "target": "http://localhost:8045", "secure": false } } diff --git a/weather_platform/apps/measures-service/src/app/app.controller.ts b/weather_platform/apps/measures-service/src/app/app.controller.ts index 3ab828b..4d87f14 100644 --- a/weather_platform/apps/measures-service/src/app/app.controller.ts +++ b/weather_platform/apps/measures-service/src/app/app.controller.ts @@ -102,7 +102,7 @@ export class AppController { }) @Post('create') async createMeasure( - @Body() sectionData: MeasureCreateDTO, + @Body() sectionData: MeasureCreateDTOClass, ): Promise { const { uuid } = uuidv4(); diff --git a/weather_platform/apps/measures-service/src/main.ts b/weather_platform/apps/measures-service/src/main.ts index e42426b..334f84b 100644 --- a/weather_platform/apps/measures-service/src/main.ts +++ b/weather_platform/apps/measures-service/src/main.ts @@ -27,7 +27,7 @@ async function bootstrap() { app.enableCors(); await app.listen(port); Logger.log( - `🚀 Application is running on: http://localhost:${port}/${globalPrefix}` + `🚀 Measures Service is running on: http://localhost:${port}/${globalPrefix}` ); } diff --git a/weather_platform/apps/sensors-service/src/main.ts b/weather_platform/apps/sensors-service/src/main.ts index 19e6dcc..3c7b934 100644 --- a/weather_platform/apps/sensors-service/src/main.ts +++ b/weather_platform/apps/sensors-service/src/main.ts @@ -27,7 +27,7 @@ async function bootstrap() { app.enableCors(); await app.listen(port); Logger.log( - `🚀 Application is running on: http://localhost:${port}/${globalPrefix}` + `🚀 Sensors Service is running on: http://localhost:${port}/${globalPrefix}` ); }