bardd commited on
Commit
ba1ea27
·
1 Parent(s): 5cb02d5

next commit

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -15
  2. package.json +1 -6
Dockerfile CHANGED
@@ -1,26 +1,13 @@
1
- # Use an official Node.js runtime as the base image
2
- FROM node:14
3
 
4
- # Set the working directory in the container
5
  WORKDIR /app
6
 
7
- # Copy package.json and package-lock.json to the working directory
8
  COPY package*.json ./
9
 
10
- # Install the project dependencies
11
- RUN npm install --production
12
 
13
- # Copy the rest of the project files to the working directory
14
  COPY . .
15
 
16
- # Build the app for production
17
  RUN npm run build
18
 
19
- # Expose port 7860 (Hugging Face Spaces requirement)
20
- EXPOSE 7860
21
-
22
- # Set environment variables for production mode
23
- ENV NODE_ENV=production PORT=7860
24
-
25
- # Specify the command to run your application in production mode
26
  CMD ["npm", "run", "start:prod"]
 
1
+ FROM node:16.13.1
 
2
 
 
3
  WORKDIR /app
4
 
 
5
  COPY package*.json ./
6
 
7
+ RUN npm ci
 
8
 
 
9
  COPY . .
10
 
 
11
  RUN npm run build
12
 
 
 
 
 
 
 
 
13
  CMD ["npm", "run", "start:prod"]
package.json CHANGED
@@ -6,7 +6,7 @@
6
  "private": true,
7
  "license": "UNLICENSED",
8
  "scripts": {
9
- "build": "nest build",
10
  "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
11
  "start": "nest start",
12
  "start:dev": "nest start --watch",
@@ -15,11 +15,6 @@
15
  "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
16
  "test": "jest",
17
  "test:watch": "jest --watch",
18
- "test:cov": "jest --coverage",
19
- "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
20
- "test:e2e": "jest --config ./test/jest-e2e.json"
21
- },
22
- "dependencies": {
23
  "@nestjs/common": "^10.0.0",
24
  "@nestjs/core": "^10.0.0",
25
  "@nestjs/jwt": "^10.2.0",
 
6
  "private": true,
7
  "license": "UNLICENSED",
8
  "scripts": {
9
+ "build": "npx @nestjs/cli build",
10
  "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
11
  "start": "nest start",
12
  "start:dev": "nest start --watch",
 
15
  "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
16
  "test": "jest",
17
  "test:watch": "jest --watch",
 
 
 
 
 
18
  "@nestjs/common": "^10.0.0",
19
  "@nestjs/core": "^10.0.0",
20
  "@nestjs/jwt": "^10.2.0",