Skip to content

Commit 011b025

Browse files
authored
after uploading to VPS Docker container
1 parent 9b954b1 commit 011b025

File tree

3 files changed

+413
-326
lines changed

3 files changed

+413
-326
lines changed

Dockerfile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Use the official lightweight Node.js 14 image.
2+
# https://hub.docker.com/_/node
3+
FROM node:latest
4+
5+
# Create and change to the app directory.
6+
WORKDIR /app
7+
8+
# Copy application dependency manifests to the container image.
9+
# A wildcard is used to ensure copying both package.json AND package-lock.json (if available).
10+
# Copying this first prevents re-running npm install on every code change.
11+
COPY package*.json ./
12+
13+
# Install production dependencies.
14+
RUN npm install --only=production
15+
16+
# Copy local code to the container image.
17+
COPY . .
18+
19+
# Expose the port the app runs in
20+
EXPOSE 3002
21+
22+
# Run the web service on container startup.
23+
CMD [ "node", "app.js" ]

0 commit comments

Comments
 (0)