feat: Add Docker support with production and development configurations for backend and frontend
This commit is contained in:
22
server/Dockerfile.dev
Normal file
22
server/Dockerfile.dev
Normal file
@@ -0,0 +1,22 @@
|
||||
# Development Dockerfile with hot reload
|
||||
FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install nodemon for hot reload
|
||||
RUN npm install -g nodemon
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Install all dependencies (including dev)
|
||||
RUN npm install
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Expose ports
|
||||
EXPOSE 3001 3002
|
||||
|
||||
# Start with nodemon for hot reload
|
||||
CMD ["nodemon", "server.js"]
|
||||
Reference in New Issue
Block a user