File size: 471 Bytes
6043ccf
7b850b7
24c59d1
7b850b7
 
f686c53
 
24c59d1
7b850b7
24c59d1
d1e82b3
24c59d1
7b850b7
d1e82b3
24c59d1
 
 
 
 
6d40e21
24c59d1
5855be2
 
24c59d1
6043ccf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM node:20-alpine

# Create app directory
WORKDIR /app

RUN sudo npm install -g --unsafe-perm=true --allow-root

# Install app dependencies
COPY package*.json ./
RUN npm install

# Bundle app source
COPY . .

# Create a non-root user and switch to it
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nestjs -u 1001
RUN chown -R nestjs:nodejs /app
USER nestjs

# Expose the port the app runs on
EXPOSE 7860

# Command to run the application
CMD ["npm", "run", "start:dev"]