File size: 738 Bytes
6043ccf
7b850b7
df3f4e8
 
 
14f69c6
7b850b7
 
14f69c6
7b850b7
eca71ed
19a7ce5
24c59d1
d1e82b3
19a7ce5
 
 
df3f4e8
 
 
14f69c6
7b850b7
d1e82b3
14f69c6
 
eca71ed
14f69c6
eca71ed
6d40e21
14f69c6
5855be2
 
14f69c6
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
27
28
29
30
31
32
33
34
35
FROM node:20-alpine

# Install build dependencies
RUN apk add --no-cache make gcc g++ python3

# Create app directory
WORKDIR /app

# Install app dependencies
COPY package*.json ./

# Install dependencies
RUN npm install

# Install additional dependencies
RUN npm install mongoose bcrypt jsonwebtoken @nestjs/passport @nestjs/jwt passport-jwt passport-custom jwt-decode passport-local uuid i18n-ts

# Rebuild bcrypt
RUN npm rebuild bcrypt --build-from-source

# Bundle app source
COPY . .

# Create the dist directory and set permissions
RUN mkdir -p /app/dist && chown -R node:node /app

# Switch to non-root user
USER node

# Expose the port the app runs on
EXPOSE 7860

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