You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm fetch
22
23
COPY --chown=node:node . .
23
24
24
25
ENV NODE_ENV development
25
26
ENV NEXT_TELEMETRY_DISABLED 1
26
27
28
+
# Copied from https://stackoverflow.com/a/69867550/6141587
27
29
USER root
28
-
RUN pnpm install --frozen-lockfile --prefer-offline
29
-
RUN pnpm install sharp@0.32.6
30
+
# Give /data directory correct permissions otherwise WAL mode won't work. It means you can't have 2 users writing to the database at the same time without this line as *.sqlite-wal & *.sqlite-shm are automatically created & deleted when *.sqlite is busy.
31
+
RUN mkdir -p /data && chown -R node:node /data
32
+
33
+
USER node
34
+
RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm install --frozen-lockfile --recursive --prefer-offline
35
+
RUN pnpm install sharp@0.33.2
30
36
31
37
# 2. Rebuild the source code only when needed
32
38
FROM base AS builder
@@ -42,11 +48,6 @@ COPY --chown=node:node . .
42
48
# This will do the trick, use the corresponding env file for each environment.
43
49
COPY --chown=node:node .env* ./
44
50
45
-
# Copied from https://stackoverflow.com/a/69867550/6141587
46
-
USER root
47
-
# Give /data directory correct permissions otherwise WAL mode won't work. It means you can't have 2 users writing to the database at the same time without this line as *.sqlite-wal & *.sqlite-shm are automatically created & deleted when *.sqlite is busy.
48
-
RUN mkdir -p /data && chown -R node:node /data
49
-
50
51
# set to production otherwise it throws error ⚠ You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env
0 commit comments