File size: 637 Bytes
6043ccf
7b850b7
df3f4e8
 
 
14f69c6
7b850b7
 
4700c58
 
 
 
 
eca71ed
19a7ce5
4700c58
d1e82b3
4700c58
 
19a7ce5
4700c58
df3f4e8
 
14f69c6
 
eca71ed
14f69c6
eca71ed
6d40e21
14f69c6
5855be2
 
14f69c6
4700c58
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
FROM node:20-alpine

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

# Create app directory
WORKDIR /app

# Copy all application files
COPY . .

# Remove existing node_modules (if any)
RUN rm -rf node_modules

# Install dependencies
RUN npm ci

# Build the application
RUN npm run build

# Rebuild bcrypt (if necessary)
RUN npm rebuild bcrypt --build-from-source

# 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"]