2025-05-24 14:37:19 -06:00
|
|
|
FROM --platform=linux/amd64 node:20-slim AS builder
|
2024-04-09 16:21:05 +05:30
|
|
|
|
|
|
|
|
WORKDIR /home/perplexica
|
|
|
|
|
|
2025-03-20 09:46:50 +05:30
|
|
|
COPY package.json yarn.lock ./
|
2025-03-20 12:47:54 +05:30
|
|
|
RUN yarn install --frozen-lockfile --network-timeout 600000
|
2025-05-24 14:37:19 -06:00
|
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
2025-03-20 09:46:50 +05:30
|
|
|
|
|
|
|
|
COPY tsconfig.json next.config.mjs next-env.d.ts postcss.config.js drizzle.config.ts tailwind.config.ts ./
|
|
|
|
|
COPY src ./src
|
|
|
|
|
COPY public ./public
|
|
|
|
|
|
|
|
|
|
RUN mkdir -p /home/perplexica/data
|
2024-04-09 16:21:05 +05:30
|
|
|
RUN yarn build
|
|
|
|
|
|
2025-05-24 14:37:19 -06:00
|
|
|
FROM --platform=linux/amd64 node:20-slim
|
|
|
|
|
|
|
|
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
2025-03-20 09:46:50 +05:30
|
|
|
|
|
|
|
|
WORKDIR /home/perplexica
|
|
|
|
|
|
|
|
|
|
COPY --from=builder /home/perplexica/public ./public
|
|
|
|
|
COPY --from=builder /home/perplexica/.next/static ./public/_next/static
|
|
|
|
|
|
|
|
|
|
COPY --from=builder /home/perplexica/.next/standalone ./
|
|
|
|
|
COPY --from=builder /home/perplexica/data ./data
|
|
|
|
|
|
2025-05-27 13:18:18 -06:00
|
|
|
# Copy files needed for database migrations at runtime
|
|
|
|
|
COPY drizzle.config.ts ./
|
|
|
|
|
COPY src/lib/db/schema.ts ./src/lib/db/
|
|
|
|
|
COPY docker-entrypoint.sh ./
|
|
|
|
|
COPY package.json ./
|
|
|
|
|
|
2025-05-24 14:37:19 -06:00
|
|
|
RUN mkdir /home/perplexica/uploads && \
|
2025-05-27 13:18:18 -06:00
|
|
|
chmod +x /home/perplexica/docker-entrypoint.sh && \
|
|
|
|
|
npm install playwright drizzle-kit && \
|
2025-06-09 23:20:24 -06:00
|
|
|
npx -y playwright install chromium --only-shell --with-deps && \
|
2025-05-24 14:37:19 -06:00
|
|
|
apt-get update && \
|
|
|
|
|
apt-get install -y procps && \
|
|
|
|
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
2025-03-20 09:46:50 +05:30
|
|
|
|
2025-05-27 13:18:18 -06:00
|
|
|
CMD ["./docker-entrypoint.sh"]
|