Skip to content

Commit

Permalink
fix gateway issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekedani committed May 27, 2024
1 parent 3f623dd commit 4debf2f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
20 changes: 10 additions & 10 deletions gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
FROM node:20-alpine As development
FROM node:20-alpine AS development

WORKDIR /usr/src/app
COPY --chown=node:node package*.json ./
COPY --chown=node:node --chmod=644 package*.json ./
RUN npm ci
COPY --chown=node:node . .
COPY --chown=node:node --chmod=644 . .
USER node


FROM node:20-alpine As build
FROM node:20-alpine AS build

WORKDIR /usr/src/app
COPY --chown=node:node package*.json ./
COPY --chown=node:node --from=development /usr/src/app/node_modules ./node_modules
COPY --chown=node:node . .
COPY --chown=node:node --chmod=644 package*.json ./
COPY --chown=node:node --chmod=644 --from=development /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --chmod=644 . .
RUN npm run build
ENV NODE_ENV production
RUN npm ci --only=production && npm cache clean --force
USER node

FROM node:20-alpine As production
FROM node:20-alpine AS production

COPY --chown=node:node --from=build /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --from=build /usr/src/app/dist ./dist
COPY --chown=node:node --chmod=644 --from=build /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --chmod=644 --from=build /usr/src/app/dist ./dist

EXPOSE 3000

Expand Down
11 changes: 1 addition & 10 deletions gateway/src/classifiers/controllers/images.controller.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import {
Controller,
Next,
Post,
Req,
Res,
UseGuards,
UseInterceptors,
} from '@nestjs/common';
import { Controller, Next, Post, Req, Res, UseGuards } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { RequestHandler } from 'http-proxy-middleware';
import { IncomingMessage, ServerResponse } from 'http';
Expand All @@ -20,7 +12,6 @@ import {
ApiTags,
} from '@nestjs/swagger';
import { JwtAuthGuard } from '../../shared/guards/jwt-auth.guard';
import { FileInterceptor } from '@nestjs/platform-express';

@ApiTags('image classifiers')
@ApiBearerAuth('Access Token')
Expand Down

0 comments on commit 4debf2f

Please sign in to comment.