2022-06-20 22:29:33 -07:00
|
|
|
FROM frolvlad/alpine-glibc AS deps
|
2021-06-23 11:20:20 -07:00
|
|
|
WORKDIR /build
|
|
|
|
|
2022-06-06 19:38:15 -04:00
|
|
|
COPY .yarn .yarn
|
|
|
|
COPY package.json yarn.lock .yarnrc.yml ./
|
2021-09-17 20:39:20 -07:00
|
|
|
|
2022-06-20 22:29:33 -07:00
|
|
|
RUN apk add --no-cache libc6-compat nodejs yarn
|
2022-06-06 19:38:15 -04:00
|
|
|
RUN yarn install --immutable
|
2022-02-19 20:17:02 -08:00
|
|
|
|
2022-06-20 22:29:33 -07:00
|
|
|
FROM frolvlad/alpine-glibc AS builder
|
2022-02-19 20:17:02 -08:00
|
|
|
WORKDIR /build
|
|
|
|
|
2022-06-20 22:29:33 -07:00
|
|
|
RUN apk add --no-cache nodejs yarn libc6-compat openssl openssl-dev
|
|
|
|
|
2022-02-19 20:17:02 -08:00
|
|
|
COPY --from=deps /build/node_modules ./node_modules
|
2021-06-23 11:20:20 -07:00
|
|
|
COPY src ./src
|
|
|
|
COPY scripts ./scripts
|
2021-08-25 15:16:39 -07:00
|
|
|
COPY prisma ./prisma
|
2022-06-06 19:38:15 -04:00
|
|
|
COPY .yarn .yarn
|
|
|
|
COPY package.json yarn.lock .yarnrc.yml esbuild.config.js next.config.js next-env.d.ts zip-env.d.ts tsconfig.json ./
|
2021-06-23 11:20:20 -07:00
|
|
|
|
2022-02-19 20:17:02 -08:00
|
|
|
ENV ZIPLINE_DOCKER_BUILD 1
|
|
|
|
ENV NEXT_TELEMETRY_DISABLED 1
|
2022-02-12 20:35:36 -08:00
|
|
|
|
2022-06-20 22:29:33 -07:00
|
|
|
RUN cat prisma/schema.prisma
|
|
|
|
|
2021-06-23 11:20:20 -07:00
|
|
|
RUN yarn build
|
|
|
|
|
2022-06-20 22:29:33 -07:00
|
|
|
FROM frolvlad/alpine-glibc AS runner
|
2021-06-23 11:20:20 -07:00
|
|
|
WORKDIR /zipline
|
|
|
|
|
2022-06-20 22:29:33 -07:00
|
|
|
RUN apk add --no-cache nodejs yarn libc6-compat openssl openssl-dev
|
|
|
|
|
2022-02-19 20:17:02 -08:00
|
|
|
ENV NODE_ENV production
|
|
|
|
ENV NEXT_TELEMETRY_DISABLED 1
|
|
|
|
|
2022-06-20 22:29:33 -07:00
|
|
|
COPY --from=builder /build/.next ./.next
|
|
|
|
COPY --from=builder /build/dist ./dist
|
|
|
|
COPY --from=builder /build/node_modules ./node_modules
|
2022-02-19 20:17:02 -08:00
|
|
|
|
|
|
|
COPY --from=builder /build/next.config.js ./next.config.js
|
2021-06-23 11:20:20 -07:00
|
|
|
COPY --from=builder /build/src ./src
|
|
|
|
COPY --from=builder /build/scripts ./scripts
|
2021-08-25 15:16:39 -07:00
|
|
|
COPY --from=builder /build/prisma ./prisma
|
2021-06-23 11:20:20 -07:00
|
|
|
COPY --from=builder /build/tsconfig.json ./tsconfig.json
|
|
|
|
COPY --from=builder /build/package.json ./package.json
|
|
|
|
|
2022-03-02 22:04:56 -08:00
|
|
|
CMD ["node", "dist/server"]
|