File size: 454 Bytes
638d460
c14babc
638d460
 
 
c14babc
638d460
 
c14babc
638d460
 
c14babc
638d460
 
c14babc
638d460
 
c14babc
638d460
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM node:18-slim

# Create the log and db directories and set permissions
RUN mkdir -p /usr/src/app/log /usr/src/app/db && \
    chown -R node:node /usr/src/app/log /usr/src/app/db

# Set the working directory
WORKDIR /usr/src/app

# Copy package.json and package-lock.json first
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of your application files
COPY . .

# Command to run your application
CMD ["node", "index.js"]