-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 691 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (23 loc) · 691 Bytes
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
FROM node:18-alpine
WORKDIR /app
# Build client first (before copying root package.json to avoid conflicts)
WORKDIR /app/client
COPY client/package.json ./
RUN npm install --no-audit --no-fund --legacy-peer-deps
COPY client ./
RUN npm run build
# Build admin (before copying root package.json to avoid conflicts)
WORKDIR /app/admin
COPY admin/package.json ./
RUN npm install --no-audit --no-fund --legacy-peer-deps
COPY admin ./
RUN npm run build
# Now copy server code and install server dependencies
WORKDIR /app
COPY server ./server
COPY package*.json ./
RUN npm install --production
# Create data directory
RUN mkdir -p /app/data
EXPOSE 3000 3001
CMD ["node", "server/index.js"]