2021-06-23 13:20:20 -05:00
|
|
|
FROM node:16-alpine3.11 AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
|
2021-09-17 22:39:20 -05:00
|
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
|
|
|
2021-06-23 13:20:20 -05:00
|
|
|
COPY src ./src
|
|
|
|
COPY server ./server
|
|
|
|
COPY scripts ./scripts
|
2021-08-25 17:16:39 -05:00
|
|
|
COPY prisma ./prisma
|
2021-06-23 13:20:20 -05:00
|
|
|
|
2021-08-21 16:57:54 -05:00
|
|
|
COPY package.json yarn.lock next.config.js next-env.d.ts zip-env.d.ts tsconfig.json ./
|
2021-06-23 13:20:20 -05:00
|
|
|
|
|
|
|
RUN yarn install
|
|
|
|
|
|
|
|
# create a mock config.toml to spoof next build!
|
2021-09-17 22:39:20 -05:00
|
|
|
RUN echo -e "[uploader]\nroute = '/u'" > config.toml
|
2021-06-23 13:20:20 -05:00
|
|
|
|
|
|
|
RUN yarn build
|
|
|
|
|
|
|
|
FROM node:16-alpine3.11 AS runner
|
|
|
|
WORKDIR /zipline
|
|
|
|
|
|
|
|
COPY --from=builder /build/node_modules ./node_modules
|
|
|
|
|
|
|
|
COPY --from=builder /build/src ./src
|
|
|
|
COPY --from=builder /build/server ./server
|
|
|
|
COPY --from=builder /build/scripts ./scripts
|
2021-08-25 17:16:39 -05:00
|
|
|
COPY --from=builder /build/prisma ./prisma
|
2021-06-23 13:20:20 -05:00
|
|
|
COPY --from=builder /build/.next ./.next
|
|
|
|
COPY --from=builder /build/tsconfig.json ./tsconfig.json
|
|
|
|
COPY --from=builder /build/package.json ./package.json
|
|
|
|
|
|
|
|
CMD ["node", "server"]
|