From bf1729cf0dfe3fd5672c0d8d6b9c32dd71f0eba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Sun, 25 Aug 2024 01:39:16 +0200 Subject: [PATCH] perf(docker): optimize pnpm installation --- apps/api/Dockerfile | 4 +++- apps/website/.env.example | 1 + apps/website/Dockerfile | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index cb97ef0..7fc6075 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -2,11 +2,13 @@ FROM node:22.4.1-slim AS node-pnpm ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" RUN corepack enable +ENV TURBO_TELEMETRY_DISABLED=1 +ENV DO_NOT_TRACK=1 WORKDIR /usr/src/app FROM node-pnpm AS builder -RUN pnpm install --global turbo@2.0.14 COPY ./ ./ +RUN pnpm install --global turbo@2.0.14 RUN turbo prune @repo/api --docker FROM node-pnpm AS installer diff --git a/apps/website/.env.example b/apps/website/.env.example index 3567674..2ebd16e 100644 --- a/apps/website/.env.example +++ b/apps/website/.env.example @@ -1,3 +1,4 @@ +TZ=UTC HOSTNAME=0.0.0.0 PORT=5000 NEXT_TELEMETRY_DISABLED=1 diff --git a/apps/website/Dockerfile b/apps/website/Dockerfile index 8b9e3dc..b1c43c5 100644 --- a/apps/website/Dockerfile +++ b/apps/website/Dockerfile @@ -2,11 +2,13 @@ FROM node:22.4.1-slim AS node-pnpm ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" RUN corepack enable +ENV TURBO_TELEMETRY_DISABLED=1 +ENV DO_NOT_TRACK=1 WORKDIR /usr/src/app FROM node-pnpm AS builder -RUN pnpm install --global turbo@2.0.14 COPY ./ ./ +RUN pnpm install --global turbo@2.0.14 RUN turbo prune @repo/website --docker FROM node-pnpm AS installer