forked from graphql-hive/graphql-inspector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 708 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 708 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
FROM node:20-alpine AS build
ENV NODE_ENV=development
ENV DISTDIR=/usr/local/share/graphql-inspector
WORKDIR /app
COPY . .
RUN npm install -g pnpm@9.12.3
RUN pnpm install
RUN pnpm build
FROM node:20-alpine AS dist
ENV NODE_ENV=production
ENV DISTDIR=/usr/local/share/graphql-inspector
RUN mkdir /app
WORKDIR /app
COPY --from=build /app/packages "${DISTDIR}/packages"
COPY --from=build /app/package.json ${DISTDIR}
COPY --from=build /app/pnpm-workspace.yaml ${DISTDIR}
RUN npm install -g pnpm@9.12.3
WORKDIR ${DISTDIR}
RUN pnpm install --prod
RUN pnpm store prune
RUN ln -s "${DISTDIR}/packages/cli/dist/cjs/index.js" /usr/local/bin/graphql-inspector \
&& chmod +x /usr/local/bin/graphql-inspector