Skip to content

Commit f346d4b

Browse files
committed
add dockerfile'
1 parent 313c2c9 commit f346d4b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Dockerfile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Use an official Node.js runtime as a parent image
2+
FROM node:20-alpine
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 app dependencies
11+
RUN npm install
12+
13+
COPY ./ ./
14+
15+
RUN npm run build \
16+
&& rm -rf node_modules \
17+
&& npm install --production
18+
19+
# Bundle app source
20+
COPY . .
21+
22+
# Expose the port your app runs on
23+
EXPOSE 8787
24+
25+
ENTRYPOINT ["npm"]
26+
27+
# Define the command to run your app
28+
CMD ["run", "start:node"]

0 commit comments

Comments
 (0)