mirror of
https://github.com/diced/zipline.git
synced 2025-12-12 07:40:45 -08:00
* feat: start removing next.js * feat: working ssr + dev + prod env * feat: all functionality added + client/ -> src/client/ * fix: build process * fix: caching on pnpm action * fix: ignores + cache action * fix: docker + exdev error * fix: generate prisma before types * fix: remove node@20 from actions * feat: dynamic import optimizations + titled pages * fix: removed unused vars * feat: small ui fixes and improvements * feat: small ui improvements * fix: linting error * fix: regex when adding domains
60 lines
1.3 KiB
Docker
Executable File
60 lines
1.3 KiB
Docker
Executable File
FROM node:22-alpine3.21 AS base
|
|
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
|
|
RUN corepack enable
|
|
|
|
RUN apk add --no-cache ffmpeg tzdata
|
|
|
|
WORKDIR /zipline
|
|
|
|
COPY prisma ./prisma
|
|
COPY package.json .
|
|
COPY pnpm-lock.yaml .
|
|
|
|
FROM base AS deps
|
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
|
|
|
FROM base AS builder
|
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
|
|
|
COPY src ./src
|
|
COPY .gitignore ./.gitignore
|
|
|
|
COPY postcss.config.cjs ./postcss.config.cjs
|
|
COPY prettier.config.cjs ./prettier.config.cjs
|
|
COPY eslint.config.mjs ./eslint.config.mjs
|
|
COPY vite.config.ts ./vite.config.ts
|
|
COPY tsup.config.ts ./tsup.config.ts
|
|
COPY tsconfig.json ./tsconfig.json
|
|
COPY mimes.json ./mimes.json
|
|
COPY code.json ./code.json
|
|
COPY vite-env.d.ts ./vite-env.d.ts
|
|
|
|
ENV NEXT_TELEMETRY_DISABLED=1 \
|
|
NODE_ENV=production
|
|
|
|
RUN ZIPLINE_BUILD=true pnpm run build
|
|
|
|
FROM base
|
|
|
|
COPY --from=deps /zipline/node_modules ./node_modules
|
|
|
|
COPY --from=builder /zipline/build ./build
|
|
|
|
COPY --from=builder /zipline/mimes.json ./mimes.json
|
|
COPY --from=builder /zipline/code.json ./code.json
|
|
|
|
RUN pnpm build:prisma
|
|
|
|
# clean
|
|
RUN rm -rf /tmp/* /root/*
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
ARG ZIPLINE_GIT_SHA
|
|
ENV ZIPLINE_GIT_SHA=${ZIPLINE_GIT_SHA:-"unknown"}
|
|
|
|
CMD ["node", "--enable-source-maps", "build/server"]
|