2024-05-09 02:16:45 +08:00
|
|
|
FROM node:alpine as builder
|
|
|
|
|
|
|
|
WORKDIR /home/perplexica
|
|
|
|
|
|
|
|
COPY ui /home/perplexica/
|
|
|
|
|
|
|
|
RUN yarn install
|
|
|
|
RUN yarn build
|
|
|
|
|
|
|
|
FROM node:alpine as runner
|
2024-04-09 16:21:05 +05:30
|
|
|
|
|
|
|
ARG NEXT_PUBLIC_WS_URL
|
|
|
|
ARG NEXT_PUBLIC_API_URL
|
|
|
|
ENV NEXT_PUBLIC_WS_URL=${NEXT_PUBLIC_WS_URL}
|
|
|
|
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
|
|
|
|
|
|
|
|
WORKDIR /home/perplexica
|
|
|
|
|
2024-05-09 02:16:45 +08:00
|
|
|
COPY --from=builder /home/perplexica/package.json .
|
|
|
|
COPY --from=builder /home/perplexica/yarn.lock .
|
|
|
|
COPY --from=builder /home/perplexica/next.config.mjs .
|
|
|
|
COPY --from=builder /home/perplexica/.next/standalone .
|
|
|
|
COPY --from=builder /home/perplexica/public ./public
|
|
|
|
COPY --from=builder /home/perplexica/.next/static ./.next/static
|
2024-04-09 16:21:05 +05:30
|
|
|
|
2024-05-09 02:16:45 +08:00
|
|
|
ENTRYPOINT ["node", "server.js"]
|