-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdev.Dockerfile
More file actions
30 lines (21 loc) · 718 Bytes
/
dev.Dockerfile
File metadata and controls
30 lines (21 loc) · 718 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
ARG SERVICE_PATH
RUN apk add --no-cache python3 make g++
RUN npm i -g @nestjs/cli
WORKDIR /app
COPY package.json package-lock.json ./
COPY common common
COPY core core
COPY clients clients
COPY microservices microservices
RUN npm i --legacy-peer-deps --include=optional
RUN npm run build --workspace=common
RUN if [ -f "${SERVICE_PATH}/package.json" ]; then \
npm run build --workspace="${SERVICE_PATH}" 2>/dev/null || true; \
fi
WORKDIR /app
CMD if echo "${SERVICE_PATH}" | grep -q "clients/web\|clients/image-generation-frontend"; then \
cd "${SERVICE_PATH}" && npm run build && node build/index.js; \
else \
cd "${SERVICE_PATH}" && node dist/main.js; \
fi