File size: 372 Bytes
8a830b8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Base Node image
FROM node:18-alpine

# Install nginx for static frontend
RUN apk add --no-cache nginx

# Create directories
WORKDIR /app
COPY server ./server
COPY app ./app

# Install backend dependencies
WORKDIR /app/server
RUN npm install

# Expose Ports
EXPOSE 8080 80

# Start both backend and frontend
CMD sh -c "node /app/server/server.js & nginx -g 'daemon off;'"