-
Notifications
You must be signed in to change notification settings - Fork 47
/
Dockerfile.dev
35 lines (30 loc) · 1.15 KB
/
Dockerfile.dev
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
35
FROM node:18-slim AS base
RUN npm i -g pnpm
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
FROM base AS build
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
# RUN pnpm deploy --filter=vite-vue3 /app/vite-vue3
# RUN pnpm deploy --filter=cra-react18 /app/cra-react18
RUN pnpm deploy --filter=express-server /app/express-server
# RUN pnpm deploy --filter=nest-server /app/nest-server
# FROM base AS vite-vue3-frontend
# COPY --from=build /app/vite-vue3 /usr/src/fullstack-blog/app/vite-vue3
# WORKDIR /usr/src/fullstack-blog/app/vite-vue3
# EXPOSE 3000
# CMD ["pnpm", "dev"]
# FROM base AS cra-react18-frontend
# COPY --from=build /app/cra-react18 /usr/src/fullstack-blog/app/cra-react18
# WORKDIR /usr/src/fullstack-blog/app/cra-react18
# EXPOSE 3000
# CMD ["pnpm", "dev"]
FROM base AS express-backend
RUN npm i -g pm2-dev
COPY --from=build /app/express-server /usr/src/fullstack-blog/app/express-server
WORKDIR /usr/src/fullstack-blog/app/express-server
EXPOSE 8002
CMD ["pnpm", "docker-dev"]
# FROM base AS nestjs-backend
# COPY --from=build /app/nest-server /usr/src/fullstack-blog/app/nest-server