File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 1+ PORT = <PORT>
2+ HOST = <HOST>
3+
Original file line number Diff line number Diff line change 1+ # Use a Node.js base image
2+ FROM node:20
3+
4+ # Set working directory
5+ WORKDIR /app
6+
7+ # Copy package.json and install dependencies
8+ COPY package*.json ./
9+ RUN npm install
10+
11+ # Copy the rest of the application code
12+ COPY . .
13+
14+ # Expose the port the frontend runs on
15+ EXPOSE 3000
16+
17+ # Build nextJS
18+ RUN npm run build
19+
20+ # Start the frontend
21+ CMD ["npm" , "start" ]
22+
Original file line number Diff line number Diff line change 33 "version" : " 0.1.0" ,
44 "private" : true ,
55 "scripts" : {
6- "dev" : " next dev" ,
6+ "dev" : " HOST=0.0.0.0 PORT=3000 next dev" ,
77 "build" : " next build" ,
8- "start" : " next start" ,
8+ "start" : " HOST=0.0.0.0 PORT=3000 next start" ,
99 "lint" : " next lint"
1010 },
1111 "dependencies" : {
You can’t perform that action at this time.
0 commit comments