diff --git a/Dockerfile b/Dockerfile index 4e662fe..f698408 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,9 @@ FROM node +RUN mkdir /app +RUN cd /app +WORKDIR /app + COPY package.json package.json COPY package-lock.json package-lock.json @@ -7,6 +11,7 @@ RUN npm install COPY . . -RUN npm run build +RUN npm run ng build api --configuration production +RUN npm run ng build client CMD [ "npm", "run", "prod" ] diff --git a/apps/api/src/app/app.controller.ts b/apps/api/src/app/app.controller.ts index c26aa46..3a810a9 100644 --- a/apps/api/src/app/app.controller.ts +++ b/apps/api/src/app/app.controller.ts @@ -1,6 +1,6 @@ import { Controller, Get } from '@nestjs/common'; -import { Message } from '@vidgrab2/api-interfaces'; +import { Message } from '@vidgrab/api-interfaces'; import { AppService } from './app.service'; diff --git a/apps/api/src/app/app.service.ts b/apps/api/src/app/app.service.ts index 69d32af..7dea26c 100644 --- a/apps/api/src/app/app.service.ts +++ b/apps/api/src/app/app.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { Message } from '@vidgrab2/api-interfaces'; +import { Message } from '@vidgrab/api-interfaces'; @Injectable() export class AppService { diff --git a/apps/api/src/app/job.gateway.ts b/apps/api/src/app/job.gateway.ts index 520f1df..d1943a5 100644 --- a/apps/api/src/app/job.gateway.ts +++ b/apps/api/src/app/job.gateway.ts @@ -9,7 +9,7 @@ import { import { pick } from 'lodash'; import { Server, Socket } from 'socket.io'; -import { JobEvent } from '@vidgrab2/api-interfaces'; +import { JobEvent } from '@vidgrab/api-interfaces'; @WebSocketGateway() export class JobGateway implements OnGatewayConnection, OnGatewayDisconnect { diff --git a/apps/api/src/web/web.controller.ts b/apps/api/src/web/web.controller.ts index 93a6d63..108cbb1 100644 --- a/apps/api/src/web/web.controller.ts +++ b/apps/api/src/web/web.controller.ts @@ -18,7 +18,7 @@ import { ConfigService } from '@nestjs/config'; import { Queue } from 'bull'; import { pick, trimEnd } from 'lodash'; -import { QueueDto, UploadDto } from '@vidgrab2/api-interfaces'; +import { QueueDto, UploadDto } from '@vidgrab/api-interfaces'; import { YtdlService } from '../ytdl/ytdl.service'; @Controller() diff --git a/apps/api/src/ytdl/ytdl.processor.ts b/apps/api/src/ytdl/ytdl.processor.ts index 1bc6cf7..161d158 100644 --- a/apps/api/src/ytdl/ytdl.processor.ts +++ b/apps/api/src/ytdl/ytdl.processor.ts @@ -13,7 +13,7 @@ import { EventEmitter2 } from '@nestjs/event-emitter'; import { Job } from 'bull'; import { throttle } from 'lodash'; import * as split from 'split2'; -import { QueueDto } from '@vidgrab2/api-interfaces'; +import { QueueDto } from '@vidgrab/api-interfaces'; import { raw } from 'youtube-dl-exec'; @Processor('vidgrab') diff --git a/nx.json b/nx.json index 47ec640..b348fc9 100644 --- a/nx.json +++ b/nx.json @@ -1,5 +1,5 @@ { - "npmScope": "vidgrab2", + "npmScope": "vidgrab", "affected": { "defaultBase": "master" }, @@ -14,7 +14,12 @@ "default": { "runner": "@nrwl/workspace/tasks-runners/default", "options": { - "cacheableOperations": ["build", "lint", "test", "e2e"] + "cacheableOperations": [ + "build", + "lint", + "test", + "e2e" + ] } } }, diff --git a/package.json b/package.json index 39a5e7f..44274c3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "vidgrab2", + "name": "vidgrab", "version": "0.0.0", "license": "MIT", "scripts": { @@ -10,7 +10,7 @@ "start:fe:prod": "sleep 10 && ng serve client --prod", "start:be": "ng serve api", "start:be:prod": "node dist/apps/api/main.js", - "build": "ng build api --prod && ng build client", + "build": "ng build api --configuration production && ng build client", "test": "ng test", "lint": "nx workspace-lint && ng lint", "dev": "concurrently -p=\"{name}\" -n=\"Next,NestJS\" -c=\"green,blue\" \"npm run start:fe\" \"npm run start:be\"", diff --git a/tsconfig.base.json b/tsconfig.base.json index 88a7305..22ced2d 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -10,13 +10,21 @@ "importHelpers": true, "target": "es2015", "module": "esnext", - "lib": ["es2017", "dom"], + "lib": [ + "es2017", + "dom" + ], "skipLibCheck": true, "skipDefaultLibCheck": true, "baseUrl": ".", "paths": { - "@vidgrab2/api-interfaces": ["libs/api-interfaces/src/index.ts"] + "@vidgrab/api-interfaces": [ + "libs/api-interfaces/src/index.ts" + ] } }, - "exclude": ["node_modules", "tmp"] + "exclude": [ + "node_modules", + "tmp" + ] }