| FROM node:lts-alpine AS build |
|
|
| RUN apk add --no-cache \ |
| git sudo npm \ |
| llvm \ |
| ncurses-dev xz tk-dev git-lfs \ |
| ffmpeg libsm libxext cmake mesa-gl \ |
| && git lfs install |
| |
| ENV NODE_OPTIONS="--max-old-space-size=4096" |
|
|
|
|
| RUN cd / && git clone https://github.com/TeamPiped/Piped.git /app |
|
|
| RUN --mount=type=cache,target=/var/cache/apk \ |
| apk add --no-cache \ |
| curl |
|
|
| RUN corepack enable && corepack prepare pnpm@latest --activate |
|
|
| RUN --mount=type=cache,target=/root/.local/share/pnpm \ |
| --mount=type=cache,target=/app/node_modules \ |
| cd /app && pnpm install --prefer-offline && pnpm build |
| COPY . . |
| RUN chmod +x localizefonts.sh |
| |
| FROM nginxinc/nginx-unprivileged:alpine |
|
|
| COPY --chown=101:101 --from=build /app/dist/ /usr/share/nginx/html/ |
| COPY --chown=101:101 ./nginx.conf /etc/nginx/conf.d/default.conf |
|
|
| COPY ./entrypoint.sh /entrypoint.sh |
| RUN chmod +x entrypoint.sh |
| ENTRYPOINT [ "/entrypoint.sh" ] |
|
|