@next-friday/create-app 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/nestjs/Dockerfile +14 -4
- package/templates/nextjs/Dockerfile +14 -4
- package/templates/nodejs/Dockerfile +14 -4
- package/templates/payload/Dockerfile +14 -4
- package/templates/turborepo/apps/app/Dockerfile +14 -4
- package/templates/turborepo/apps/backoffice/Dockerfile +14 -4
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Runs on any OCI platform (Railway, Vercel Container Runtime, Fly.io, Cloud Run). The platform sets `PORT`.
|
|
2
|
-
FROM
|
|
2
|
+
FROM \
|
|
3
|
+
node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53 \
|
|
4
|
+
AS base
|
|
3
5
|
WORKDIR /app
|
|
4
6
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
5
|
-
RUN
|
|
7
|
+
RUN corepack enable
|
|
6
8
|
|
|
7
9
|
FROM base AS build
|
|
8
10
|
RUN pnpm install --frozen-lockfile --ignore-scripts
|
|
@@ -13,12 +15,20 @@ RUN pnpm build
|
|
|
13
15
|
FROM base AS prod-deps
|
|
14
16
|
RUN pnpm install --frozen-lockfile --ignore-scripts --prod
|
|
15
17
|
|
|
16
|
-
FROM
|
|
18
|
+
FROM \
|
|
19
|
+
node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53
|
|
17
20
|
ENV NODE_ENV=production
|
|
18
21
|
WORKDIR /app
|
|
19
22
|
# Apply Alpine security fixes released after the base image, and drop npm, corepack, and yarn: the app never runs them, and their bundled dependencies carry their own CVEs.
|
|
20
23
|
RUN apk upgrade --no-cache \
|
|
21
|
-
&& rm -rf
|
|
24
|
+
&& rm -rf \
|
|
25
|
+
/usr/local/lib/node_modules \
|
|
26
|
+
/usr/local/bin/npm \
|
|
27
|
+
/usr/local/bin/npx \
|
|
28
|
+
/usr/local/bin/corepack \
|
|
29
|
+
/usr/local/bin/yarn \
|
|
30
|
+
/usr/local/bin/yarnpkg \
|
|
31
|
+
/opt/yarn-*
|
|
22
32
|
COPY package.json ./
|
|
23
33
|
COPY --from=prod-deps /app/node_modules ./node_modules
|
|
24
34
|
COPY --from=build /app/dist ./dist
|
|
@@ -1,20 +1,30 @@
|
|
|
1
1
|
# Runs on any OCI platform (Railway, Fly.io, Cloud Run). On Vercel, deploy without it. The platform sets `PORT`.
|
|
2
|
-
FROM
|
|
2
|
+
FROM \
|
|
3
|
+
node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53 \
|
|
4
|
+
AS build
|
|
3
5
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
4
6
|
WORKDIR /app
|
|
5
7
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
6
|
-
RUN
|
|
8
|
+
RUN corepack enable
|
|
7
9
|
RUN pnpm install --frozen-lockfile --ignore-scripts
|
|
8
10
|
COPY next.config.ts postcss.config.mjs tsconfig.json ./
|
|
9
11
|
COPY app ./app
|
|
10
12
|
RUN pnpm build
|
|
11
13
|
|
|
12
|
-
FROM
|
|
14
|
+
FROM \
|
|
15
|
+
node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53
|
|
13
16
|
ENV NODE_ENV=production NEXT_TELEMETRY_DISABLED=1 HOSTNAME=0.0.0.0
|
|
14
17
|
WORKDIR /app
|
|
15
18
|
# Apply Alpine security fixes released after the base image, and drop npm, corepack, and yarn: the app never runs them, and their bundled dependencies carry their own CVEs.
|
|
16
19
|
RUN apk upgrade --no-cache \
|
|
17
|
-
&& rm -rf
|
|
20
|
+
&& rm -rf \
|
|
21
|
+
/usr/local/lib/node_modules \
|
|
22
|
+
/usr/local/bin/npm \
|
|
23
|
+
/usr/local/bin/npx \
|
|
24
|
+
/usr/local/bin/corepack \
|
|
25
|
+
/usr/local/bin/yarn \
|
|
26
|
+
/usr/local/bin/yarnpkg \
|
|
27
|
+
/opt/yarn-*
|
|
18
28
|
# Next.js writes .next/cache at runtime. Add `COPY --from=build --chown=node:node /app/public ./public` when the app has a public/ folder, and allow it in .dockerignore.
|
|
19
29
|
COPY --from=build --chown=node:node /app/.next/standalone ./
|
|
20
30
|
COPY --from=build --chown=node:node /app/.next/static ./.next/static
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Runs on any OCI platform (Railway, Fly.io, Cloud Run). The platform sets `PORT`.
|
|
2
|
-
FROM
|
|
2
|
+
FROM \
|
|
3
|
+
node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53 \
|
|
4
|
+
AS base
|
|
3
5
|
WORKDIR /app
|
|
4
6
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
5
|
-
RUN
|
|
7
|
+
RUN corepack enable
|
|
6
8
|
|
|
7
9
|
FROM base AS build
|
|
8
10
|
RUN pnpm install --frozen-lockfile --ignore-scripts
|
|
@@ -13,12 +15,20 @@ RUN pnpm build
|
|
|
13
15
|
FROM base AS prod-deps
|
|
14
16
|
RUN pnpm install --frozen-lockfile --ignore-scripts --prod
|
|
15
17
|
|
|
16
|
-
FROM
|
|
18
|
+
FROM \
|
|
19
|
+
node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53
|
|
17
20
|
ENV NODE_ENV=production
|
|
18
21
|
WORKDIR /app
|
|
19
22
|
# Apply Alpine security fixes released after the base image, and drop npm, corepack, and yarn: the app never runs them, and their bundled dependencies carry their own CVEs.
|
|
20
23
|
RUN apk upgrade --no-cache \
|
|
21
|
-
&& rm -rf
|
|
24
|
+
&& rm -rf \
|
|
25
|
+
/usr/local/lib/node_modules \
|
|
26
|
+
/usr/local/bin/npm \
|
|
27
|
+
/usr/local/bin/npx \
|
|
28
|
+
/usr/local/bin/corepack \
|
|
29
|
+
/usr/local/bin/yarn \
|
|
30
|
+
/usr/local/bin/yarnpkg \
|
|
31
|
+
/opt/yarn-*
|
|
22
32
|
COPY package.json ./
|
|
23
33
|
COPY --from=prod-deps /app/node_modules ./node_modules
|
|
24
34
|
COPY --from=build /app/dist ./dist
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Runs on any OCI platform (Railway, Fly.io, Cloud Run). On Vercel, deploy without it. The platform sets `PORT`.
|
|
2
|
-
FROM
|
|
2
|
+
FROM \
|
|
3
|
+
node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53 \
|
|
4
|
+
AS build
|
|
3
5
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
4
6
|
WORKDIR /app
|
|
5
7
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
6
|
-
RUN
|
|
8
|
+
RUN corepack enable
|
|
7
9
|
RUN pnpm install --frozen-lockfile --ignore-scripts
|
|
8
10
|
COPY next.config.ts tsconfig.json ./
|
|
9
11
|
COPY src ./src
|
|
@@ -11,12 +13,20 @@ COPY src ./src
|
|
|
11
13
|
# the platform sets the real ones at runtime, and the build never connects to the database.
|
|
12
14
|
RUN PAYLOAD_SECRET=build-only DATABASE_URL=postgres://build-only@localhost/build-only APP_URL=http://localhost:3000 pnpm build
|
|
13
15
|
|
|
14
|
-
FROM
|
|
16
|
+
FROM \
|
|
17
|
+
node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53
|
|
15
18
|
ENV NODE_ENV=production NEXT_TELEMETRY_DISABLED=1 HOSTNAME=0.0.0.0
|
|
16
19
|
WORKDIR /app
|
|
17
20
|
# Apply Alpine security fixes released after the base image, and drop npm, corepack, and yarn: the app never runs them, and their bundled dependencies carry their own CVEs.
|
|
18
21
|
RUN apk upgrade --no-cache \
|
|
19
|
-
&& rm -rf
|
|
22
|
+
&& rm -rf \
|
|
23
|
+
/usr/local/lib/node_modules \
|
|
24
|
+
/usr/local/bin/npm \
|
|
25
|
+
/usr/local/bin/npx \
|
|
26
|
+
/usr/local/bin/corepack \
|
|
27
|
+
/usr/local/bin/yarn \
|
|
28
|
+
/usr/local/bin/yarnpkg \
|
|
29
|
+
/opt/yarn-* \
|
|
20
30
|
&& install -d -o node -g node media
|
|
21
31
|
# Next.js writes .next/cache at runtime. Add `COPY --from=build --chown=node:node /app/public ./public` when the app has a public/ folder, and allow it in .dockerignore. Uploads go to the container filesystem, which is lost on redeploy; use a storage adapter or a mounted volume in production.
|
|
22
32
|
COPY --from=build --chown=node:node /app/.next/standalone ./
|
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
# Runs on any OCI platform (Railway, Fly.io, Cloud Run). On Vercel, deploy without it. The platform sets `PORT`.
|
|
2
|
-
FROM
|
|
2
|
+
FROM \
|
|
3
|
+
node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53 \
|
|
4
|
+
AS build
|
|
3
5
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
4
6
|
WORKDIR /app
|
|
5
7
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
6
8
|
COPY apps/app/package.json apps/app/package.json
|
|
7
9
|
COPY apps/backoffice/package.json apps/backoffice/package.json
|
|
8
|
-
RUN
|
|
10
|
+
RUN corepack enable
|
|
9
11
|
RUN pnpm install --frozen-lockfile --ignore-scripts --filter ./apps/app...
|
|
10
12
|
COPY apps/app/next.config.ts apps/app/postcss.config.mjs apps/app/tsconfig.json apps/app/
|
|
11
13
|
COPY apps/app/app apps/app/app
|
|
12
14
|
RUN pnpm --filter ./apps/app build
|
|
13
15
|
|
|
14
|
-
FROM
|
|
16
|
+
FROM \
|
|
17
|
+
node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53
|
|
15
18
|
ENV NODE_ENV=production NEXT_TELEMETRY_DISABLED=1 HOSTNAME=0.0.0.0
|
|
16
19
|
WORKDIR /app
|
|
17
20
|
# Apply Alpine security fixes released after the base image, and drop npm, corepack, and yarn: the app never runs them, and their bundled dependencies carry their own CVEs.
|
|
18
21
|
RUN apk upgrade --no-cache \
|
|
19
|
-
&& rm -rf
|
|
22
|
+
&& rm -rf \
|
|
23
|
+
/usr/local/lib/node_modules \
|
|
24
|
+
/usr/local/bin/npm \
|
|
25
|
+
/usr/local/bin/npx \
|
|
26
|
+
/usr/local/bin/corepack \
|
|
27
|
+
/usr/local/bin/yarn \
|
|
28
|
+
/usr/local/bin/yarnpkg \
|
|
29
|
+
/opt/yarn-*
|
|
20
30
|
# Next.js writes .next/cache at runtime. Add `COPY --from=build --chown=node:node /app/apps/app/public ./apps/app/public` when the app has a public/ folder.
|
|
21
31
|
COPY --from=build --chown=node:node /app/apps/app/.next/standalone ./
|
|
22
32
|
COPY --from=build --chown=node:node /app/apps/app/.next/static ./apps/app/.next/static
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# Runs on any OCI platform (Railway, Fly.io, Cloud Run). On Vercel, deploy without it. The platform sets `PORT`.
|
|
2
|
-
FROM
|
|
2
|
+
FROM \
|
|
3
|
+
node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53 \
|
|
4
|
+
AS build
|
|
3
5
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
4
6
|
WORKDIR /app
|
|
5
7
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
6
8
|
COPY apps/app/package.json apps/app/package.json
|
|
7
9
|
COPY apps/backoffice/package.json apps/backoffice/package.json
|
|
8
|
-
RUN
|
|
10
|
+
RUN corepack enable
|
|
9
11
|
RUN pnpm install --frozen-lockfile --ignore-scripts --filter ./apps/backoffice...
|
|
10
12
|
COPY apps/backoffice/next.config.ts apps/backoffice/tsconfig.json apps/backoffice/
|
|
11
13
|
COPY apps/backoffice/src apps/backoffice/src
|
|
@@ -13,12 +15,20 @@ COPY apps/backoffice/src apps/backoffice/src
|
|
|
13
15
|
# The platform sets the real ones at runtime, and the build never connects to the database.
|
|
14
16
|
RUN PAYLOAD_SECRET=build-only DATABASE_URL=postgres://build-only@localhost/build-only APP_URL=http://localhost:3001 pnpm --filter ./apps/backoffice build
|
|
15
17
|
|
|
16
|
-
FROM
|
|
18
|
+
FROM \
|
|
19
|
+
node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53
|
|
17
20
|
ENV NODE_ENV=production NEXT_TELEMETRY_DISABLED=1 HOSTNAME=0.0.0.0
|
|
18
21
|
WORKDIR /app
|
|
19
22
|
# Apply Alpine security fixes released after the base image, and drop npm, corepack, and yarn: the app never runs them, and their bundled dependencies carry their own CVEs.
|
|
20
23
|
RUN apk upgrade --no-cache \
|
|
21
|
-
&& rm -rf
|
|
24
|
+
&& rm -rf \
|
|
25
|
+
/usr/local/lib/node_modules \
|
|
26
|
+
/usr/local/bin/npm \
|
|
27
|
+
/usr/local/bin/npx \
|
|
28
|
+
/usr/local/bin/corepack \
|
|
29
|
+
/usr/local/bin/yarn \
|
|
30
|
+
/usr/local/bin/yarnpkg \
|
|
31
|
+
/opt/yarn-* \
|
|
22
32
|
&& install -d -o node -g node apps/backoffice/media
|
|
23
33
|
# Next.js writes .next/cache at runtime. Uploads go to the container filesystem, which is lost on redeploy; use a storage adapter or a mounted volume in production.
|
|
24
34
|
COPY --from=build --chown=node:node /app/apps/backoffice/.next/standalone ./
|