forked from jordan-dalby/ByteStash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 690 Bytes
/
Dockerfile
File metadata and controls
32 lines (25 loc) · 690 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
31
32
# Build stage for client
FROM node:22-alpine AS client-build
WORKDIR /app/client
COPY client/package.json ./
RUN npm install --package-lock-only
RUN npm ci
COPY client/ ./
RUN npm run build
# Production stage
FROM node:22-alpine AS production
WORKDIR /app
# Copy server source and dependencies
WORKDIR /app
COPY server/package.json ./
RUN apk add --no-cache --virtual .build-deps python3 make g++ gcc && \
npm install --omit=dev && \
apk del .build-deps
COPY server/src ./src
COPY server/docs ./docs
# Copy client build
COPY --from=client-build /app/client/build /client/build
# Create output directory
RUN mkdir -p ./data/snippets
EXPOSE 5000
CMD ["node", "src/app.js"]