File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ # Ignore node_modules to speed up build and avoid copying local dependencies
2+ node_modules
Original file line number Diff line number Diff line change 1+ # Development base image
2+ FROM node:20
3+
4+ # Set working directory inside the container
5+ WORKDIR /usr/src/app
6+
7+ # Copy only package files first to install dependencies
8+ COPY package*.json ./
9+
10+ # Install all dependencies (including devDependencies)
11+ RUN npm install
12+
13+ # Copy the rest of the frontend source code to the container
14+ COPY . .
15+
16+ # Use a non-root user for security
17+ RUN addgroup --system appgroup && adduser --system appuser --ingroup appgroup
18+ USER appuser
19+
20+ # Expose the development port (matching webpack dev server)
21+ EXPOSE 9000
22+
23+ # Define environment variables
24+ ENV PORT=9000
25+ ENV ENV=development
26+
27+
28+ # Run the development server with live-reload
29+ CMD ["npm" , "run" , "start:dev" ]
You can’t perform that action at this time.
0 commit comments