2024-01-07 14:09:45 +01:00
|
|
|
FROM node:20-alpine as build
|
2022-05-03 18:21:11 +02:00
|
|
|
WORKDIR /app
|
2023-09-01 15:27:55 +02:00
|
|
|
ENV PNPM_HOME="/pnpm"
|
|
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
|
|
RUN corepack enable
|
|
|
|
|
|
|
|
COPY package.json ./
|
|
|
|
COPY pnpm-lock.yaml ./
|
|
|
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
|
|
|
|
2024-02-28 23:56:28 +01:00
|
|
|
ARG PWA_ENABLED="true"
|
2024-02-27 20:55:05 +01:00
|
|
|
ARG GA_ID
|
|
|
|
ARG APP_DOMAIN
|
2024-02-27 20:38:48 +01:00
|
|
|
ARG OPENSEARCH_ENABLED="false"
|
2024-02-27 20:55:05 +01:00
|
|
|
ARG TMDB_READ_API_KEY
|
|
|
|
ARG CORS_PROXY_URL
|
|
|
|
ARG DMCA_EMAIL
|
2024-02-27 20:38:48 +01:00
|
|
|
ARG NORMAL_ROUTER="false"
|
2024-02-27 20:55:05 +01:00
|
|
|
ARG BACKEND_URL
|
2024-02-27 20:38:48 +01:00
|
|
|
ARG HAS_ONBOARDING="false"
|
2024-02-27 20:55:05 +01:00
|
|
|
ARG ONBOARDING_CHROME_EXTENSION_INSTALL_LINK
|
|
|
|
ARG ONBOARDING_PROXY_INSTALL_LINK
|
|
|
|
ARG DISALLOWED_IDS
|
|
|
|
ARG CDN_REPLACEMENTS
|
|
|
|
ARG TURNSTILE_KEY
|
2024-03-31 23:43:00 +02:00
|
|
|
ARG ALLOW_AUTOPLAY="false"
|
2024-02-21 18:54:01 +01:00
|
|
|
|
|
|
|
ENV VITE_PWA_ENABLED=${PWA_ENABLED}
|
2024-02-27 20:38:48 +01:00
|
|
|
ENV VITE_GA_ID=${GA_ID}
|
|
|
|
ENV VITE_APP_DOMAIN=${APP_DOMAIN}
|
|
|
|
ENV VITE_OPENSEARCH_ENABLED=${OPENSEARCH_ENABLED}
|
|
|
|
ENV VITE_TMDB_READ_API_KEY=${TMDB_READ_API_KEY}
|
|
|
|
ENV VITE_CORS_PROXY_URL=${CORS_PROXY_URL}
|
|
|
|
ENV VITE_DMCA_EMAIL=${DMCA_EMAIL}
|
|
|
|
ENV VITE_NORMAL_ROUTER=${NORMAL_ROUTER}
|
|
|
|
ENV VITE_BACKEND_URL=${BACKEND_URL}
|
|
|
|
ENV VITE_HAS_ONBOARDING=${HAS_ONBOARDING}
|
|
|
|
ENV VITE_ONBOARDING_CHROME_EXTENSION_INSTALL_LINK=${ONBOARDING_CHROME_EXTENSION_INSTALL_LINK}
|
|
|
|
ENV VITE_ONBOARDING_PROXY_INSTALL_LINK=${ONBOARDING_PROXY_INSTALL_LINK}
|
|
|
|
ENV VITE_DISALLOWED_IDS=${DISALLOWED_IDS}
|
|
|
|
ENV VITE_CDN_REPLACEMENTS=${CDN_REPLACEMENTS}
|
|
|
|
ENV VITE_TURNSTILE_KEY=${TURNSTILE_KEY}
|
2024-03-31 23:43:00 +02:00
|
|
|
ENV VITE_ALLOW_AUTOPLAY=${ALLOW_AUTOPLAY}
|
2024-02-21 18:54:01 +01:00
|
|
|
|
2022-05-03 18:21:11 +02:00
|
|
|
COPY . ./
|
2023-09-01 15:27:55 +02:00
|
|
|
RUN pnpm run build
|
2022-05-03 18:21:11 +02:00
|
|
|
|
|
|
|
# production environment
|
|
|
|
FROM nginx:stable-alpine
|
2024-01-02 00:44:45 +01:00
|
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
2022-05-03 18:21:11 +02:00
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|