File size: 630 Bytes
3c7b51d
67b3a6c
3c7b51d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM node:18-alpine
# Fixed framer-motion build errors - v2

WORKDIR /app

# Copy package files
COPY package.json ./
COPY server/package.json ./server/
COPY client/package.json ./client/

# Install dependencies
RUN npm install --production
RUN cd server && npm install --production
RUN cd client && npm install --silent

# Copy source code
COPY server ./server
COPY client ./client

# Build React app
RUN cd client && npm run build

# Remove unnecessary files
RUN rm -rf client/src client/public client/node_modules

# Environment
ENV NODE_ENV=production
ENV PORT=7860

EXPOSE 7860

# Start server
CMD ["node", "server/index.js"]