2025-03-21 11:25:28 +05:30
|
|
|
FROM node:20.18.0-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-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
|
feat(i18n): Integrate next-intl, localize core UI, add regional locales and zh-TW Discover sources
**Overview**
- Integrates next-intl (App Router, no i18n routing) with cookie-based locale and Accept-Language fallback.
- Adds message bundles and regional variants; sets en-US as the default.
**Key changes**
- i18n foundation
- Adds request-scoped config to load messages per locale and injects NextIntlClientProvider in [layout.tsx]
- Adds/updates messages for: en-US, en-GB, zh-TW, zh-HK, zh-CN, ja, ko, fr-FR, fr-CA, de.
Centralizes LOCALES, LOCALE_LABELS, and DEFAULT_LOCALE in [locales.ts]
- Adds LocaleSwitcher (cookie-based) and [LocaleBootstrap]
- Pages and components
- Localizes Sidebar, Home (including metadata/manifest), Settings, Discover, Library.
- Localizes common components: MessageInput, Attach, Focus, Optimization, MessageBox, MessageSources, SearchImages, SearchVideos, EmptyChat, NewsArticleWidget, WeatherWidget.
- APIs
- Weather API returns localized condition strings server-side.
- UX and quality
- Converts all remaining <img> to Next Image.
- Updates browserslist/caniuse DB to silence warnings.
- Security: Settings API Key inputs are now password fields and placeholders were removed.
2025-08-16 12:27:18 +08:00
|
|
|
COPY messages ./messages
|
2025-03-20 09:46:50 +05:30
|
|
|
COPY public ./public
|
|
|
|
|
|
|
|
|
|
RUN mkdir -p /home/perplexica/data
|
2024-04-09 16:21:05 +05:30
|
|
|
RUN yarn build
|
|
|
|
|
|
2025-05-28 10:41:12 +05:30
|
|
|
RUN yarn add --dev @vercel/ncc
|
|
|
|
|
RUN yarn ncc build ./src/lib/db/migrate.ts -o migrator
|
|
|
|
|
|
2025-03-21 11:25:28 +05:30
|
|
|
FROM node:20.18.0-slim
|
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-28 10:41:12 +05:30
|
|
|
COPY drizzle ./drizzle
|
|
|
|
|
COPY --from=builder /home/perplexica/migrator/build ./build
|
|
|
|
|
COPY --from=builder /home/perplexica/migrator/index.js ./migrate.js
|
2025-03-20 09:46:50 +05:30
|
|
|
|
|
|
|
|
RUN mkdir /home/perplexica/uploads
|
|
|
|
|
|
2025-05-28 10:41:12 +05:30
|
|
|
COPY entrypoint.sh ./entrypoint.sh
|
|
|
|
|
RUN chmod +x ./entrypoint.sh
|
|
|
|
|
CMD ["./entrypoint.sh"]
|