@nocobase/app-template-default 0.0.0-stage → 1.0.0-beta.57
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/.cursor/mcp.json +8 -0
- package/.mcp.json +8 -0
- package/.prettierignore +20 -0
- package/.vscode/mcp.json +8 -0
- package/AGENTS.md +432 -0
- package/CLAUDE.md +9 -0
- package/Dockerfile +132 -0
- package/Dockerfile.dockerignore +45 -0
- package/README.MD +481 -0
- package/cli/plugins.ts +14 -0
- package/client/agent-annotations-host.ts +19 -0
- package/client/app.ts +38 -0
- package/client/components/back-button.tsx +49 -0
- package/client/components/breadcrumbs.tsx +167 -0
- package/client/components/inbox-badge.ts +49 -0
- package/client/components/inbox-button.tsx +132 -0
- package/client/components/inbox-header-button.tsx +25 -0
- package/client/components/loading.tsx +35 -0
- package/client/components/page-container.tsx +24 -0
- package/client/components/page-header.tsx +33 -0
- package/client/components/route-child-page.tsx +121 -0
- package/client/components/route-dialog.tsx +10 -0
- package/client/components/route-drawer.tsx +10 -0
- package/client/components/route-overlay.tsx +190 -0
- package/client/components/ui/alert.tsx +75 -0
- package/client/components/ui/badge.tsx +51 -0
- package/client/components/ui/breadcrumb.tsx +121 -0
- package/client/components/ui/button.tsx +58 -0
- package/client/components/ui/collapsible.tsx +19 -0
- package/client/components/ui/context-menu.tsx +271 -0
- package/client/components/ui/dialog.tsx +160 -0
- package/client/components/ui/dropdown-menu.tsx +270 -0
- package/client/components/ui/empty.tsx +103 -0
- package/client/components/ui/field.tsx +236 -0
- package/client/components/ui/input-group.tsx +158 -0
- package/client/components/ui/input.tsx +20 -0
- package/client/components/ui/kbd.tsx +26 -0
- package/client/components/ui/label.tsx +18 -0
- package/client/components/ui/popover.tsx +89 -0
- package/client/components/ui/select.tsx +200 -0
- package/client/components/ui/separator.tsx +22 -0
- package/client/components/ui/sheet.tsx +137 -0
- package/client/components/ui/sidebar.tsx +723 -0
- package/client/components/ui/skeleton.tsx +13 -0
- package/client/components/ui/spinner.tsx +20 -0
- package/client/components/ui/tabs.tsx +79 -0
- package/client/components/ui/textarea.tsx +17 -0
- package/client/components/ui/toast.tsx +231 -0
- package/client/components/ui/tooltip.tsx +63 -0
- package/client/components/use-route-overlay.ts +26 -0
- package/client/config/api.ts +13 -0
- package/client/config/app.ts +8 -0
- package/client/config/auth.ts +18 -0
- package/client/config/index.ts +17 -0
- package/client/extensions/nocobase-auth-forms/field-props.ts +13 -0
- package/client/extensions/nocobase-auth-forms/form-parts.tsx +101 -0
- package/client/extensions/nocobase-auth-forms/password-input.tsx +41 -0
- package/client/extensions/nocobase-auth-forms/password-login-form.tsx +123 -0
- package/client/extensions/nocobase-auth-forms/password-registration-form.tsx +193 -0
- package/client/extensions/nocobase-auth-forms/password-reset-form.tsx +132 -0
- package/client/extensions/nocobase-auth-forms/password-reset-request-form.tsx +99 -0
- package/client/extensions/nocobase-auth-methods/auth-methods.tsx +170 -0
- package/client/extensions/nocobase-auth-split-layout/auth-split-layout.tsx +126 -0
- package/client/extensions/nocobase-device-approval/device-approval.tsx +277 -0
- package/client/extensions/nocobase-device-approval/locales/en-US.ts +55 -0
- package/client/extensions/nocobase-device-approval/locales/zh-CN.ts +27 -0
- package/client/extensions/nocobase-device-approval/use-device-approval.ts +176 -0
- package/client/extensions/nocobase-file-component-ui/README.md +13 -0
- package/client/extensions/nocobase-file-component-ui/components/file-list.tsx +147 -0
- package/client/extensions/nocobase-file-component-ui/components/file-preview-dialog.tsx +263 -0
- package/client/extensions/nocobase-file-component-ui/components/file-preview-field.tsx +68 -0
- package/client/extensions/nocobase-file-component-ui/components/file-thumbnail.tsx +73 -0
- package/client/extensions/nocobase-file-component-ui/components/file-upload-field.tsx +386 -0
- package/client/extensions/nocobase-file-component-ui/components/previewers/file-preview-content.tsx +255 -0
- package/client/extensions/nocobase-file-component-ui/components/previewers/office-open-xml-preview.tsx +226 -0
- package/client/extensions/nocobase-file-component-ui/index.ts +8 -0
- package/client/extensions/nocobase-file-component-ui/lib/file-preview.ts +194 -0
- package/client/extensions/nocobase-file-component-ui/lib/file-url.ts +22 -0
- package/client/extensions/nocobase-file-component-ui/lib/message-key.ts +18 -0
- package/client/extensions/nocobase-file-component-ui/types.ts +69 -0
- package/client/extensions/nocobase-inbox/decision-actions-bar.tsx +140 -0
- package/client/extensions/nocobase-inbox/frame.ts +31 -0
- package/client/extensions/nocobase-inbox/inbox-actions.ts +21 -0
- package/client/extensions/nocobase-inbox/inbox-detail.tsx +386 -0
- package/client/extensions/nocobase-inbox/inbox-item.tsx +274 -0
- package/client/extensions/nocobase-inbox/inbox-list.tsx +433 -0
- package/client/extensions/nocobase-inbox/inbox-page.tsx +545 -0
- package/client/extensions/nocobase-inbox/locales/en-US.ts +111 -0
- package/client/extensions/nocobase-inbox/locales/zh-CN.ts +57 -0
- package/client/extensions/nocobase-inbox/model.ts +428 -0
- package/client/extensions/nocobase-inbox/registry-scope.tsx +49 -0
- package/client/extensions/nocobase-inbox/registry.ts +303 -0
- package/client/extensions/nocobase-inbox/source.ts +117 -0
- package/client/hooks/use-mobile.ts +21 -0
- package/client/index.tsx +60 -0
- package/client/layouts/app-layout.tsx +105 -0
- package/client/layouts/components/app-brand.tsx +49 -0
- package/client/layouts/components/app-sidebar.tsx +196 -0
- package/client/layouts/components/header-actions.tsx +50 -0
- package/client/layouts/components/language-switcher.tsx +95 -0
- package/client/layouts/components/layout-header.tsx +17 -0
- package/client/layouts/components/navigation-menu.tsx +411 -0
- package/client/layouts/components/sidebar-footer.tsx +107 -0
- package/client/layouts/components/surface-empty.tsx +35 -0
- package/client/layouts/components/user-menu.tsx +127 -0
- package/client/layouts/index.ts +2 -0
- package/client/layouts/settings-layout.tsx +172 -0
- package/client/layouts/use-sidebar-preference.ts +57 -0
- package/client/lib/constants.ts +5 -0
- package/client/lib/toaster.ts +56 -0
- package/client/lib/utils.ts +1 -0
- package/client/locales/en-US.ts +178 -0
- package/client/locales/index.ts +9 -0
- package/client/locales/zh-CN.ts +161 -0
- package/client/pages/auth/device.tsx +41 -0
- package/client/pages/auth/forgot-password.tsx +39 -0
- package/client/pages/auth/login.tsx +66 -0
- package/client/pages/auth/register.tsx +46 -0
- package/client/pages/auth/reset-password.tsx +38 -0
- package/client/pages/auth/shared.tsx +111 -0
- package/client/pages/home.tsx +16 -0
- package/client/pages/inbox.tsx +12 -0
- package/client/plugins.ts +41 -0
- package/client/react-providers.ts +27 -0
- package/client/route-overrides.ts +9 -0
- package/client/routes.ts +75 -0
- package/client/routing/app-router.tsx +127 -0
- package/client/routing/client-route.tsx +129 -0
- package/client/routing/route-context.tsx +85 -0
- package/client/routing/route-navigation.ts +153 -0
- package/client/routing/route-tree.tsx +42 -0
- package/client/routing/standalone-page-layout.tsx +15 -0
- package/client/runtime.ts +26 -0
- package/client/service-provider.ts +40 -0
- package/client/source-extensions.ts +19 -0
- package/client/startup.tsx +22 -0
- package/client/styles.css +122 -0
- package/client/theme/index.ts +4 -0
- package/client/theme/theme-context.ts +12 -0
- package/client/theme/theme-preferences.ts +84 -0
- package/client/theme/theme-presets.ts +7 -0
- package/client/theme/theme-provider.tsx +106 -0
- package/client/theme/theme-settings.tsx +176 -0
- package/client/theme/themes/compact.css +140 -0
- package/client/theme/themes/default.css +117 -0
- package/client/vite-env.d.ts +5 -0
- package/components.json +27 -0
- package/config.example.yml +172 -0
- package/database/main/migrations/.gitkeep +0 -0
- package/database/main/migrations/202610060001_create_device_code.ts +37 -0
- package/database/main/seeds/.gitkeep +0 -0
- package/database/tsconfig.json +4 -0
- package/ecosystem.config.js +35 -0
- package/eslint.config.js +24 -0
- package/index.html +100 -0
- package/package.json +200 -3
- package/playwright.config.ts +10 -0
- package/public/assets/favicon.ico +0 -0
- package/public/assets/logo-dark.png +0 -0
- package/public/assets/logo-mark-dark.png +0 -0
- package/public/assets/logo-mark.png +0 -0
- package/public/assets/logo.png +0 -0
- package/server/app.ts +50 -0
- package/server/config/ai.ts +27 -0
- package/server/config/api.ts +8 -0
- package/server/config/app.ts +40 -0
- package/server/config/auth.ts +36 -0
- package/server/config/authorization.ts +18 -0
- package/server/config/caching.ts +21 -0
- package/server/config/database.ts +22 -0
- package/server/config/drive.ts +30 -0
- package/server/config/i18n.ts +17 -0
- package/server/config/index.ts +73 -0
- package/server/config/jobs.ts +27 -0
- package/server/config/logging.ts +23 -0
- package/server/config/notification.ts +11 -0
- package/server/config/queue.ts +28 -0
- package/server/config/scheduler.ts +23 -0
- package/server/config/secrets.ts +10 -0
- package/server/config/server.ts +26 -0
- package/server/config/session.ts +60 -0
- package/server/config/snowflake.ts +21 -0
- package/server/config/spa.ts +24 -0
- package/server/config/users.ts +11 -0
- package/server/config/workflow.ts +24 -0
- package/server/config.ts +24 -0
- package/server/embedded.ts +23 -0
- package/server/locales/en-US.ts +10 -0
- package/server/locales/index.ts +10 -0
- package/server/locales/zh-CN.ts +5 -0
- package/server/plugins.ts +41 -0
- package/server/providers/index.ts +5 -0
- package/server/routes/index.ts +6 -0
- package/server/runtime.ts +24 -0
- package/server/standalone.ts +29 -0
- package/server/tsconfig.json +4 -0
- package/tailwind.config.mjs +59 -0
- package/tests/components/app-layout-routes.test.tsx +132 -0
- package/tests/components/app-title.test.tsx +57 -0
- package/tests/components/auth-i18n.test.tsx +87 -0
- package/tests/components/back-button.test.tsx +80 -0
- package/tests/components/file-preview.test.tsx +101 -0
- package/tests/components/header-hover.test.tsx +87 -0
- package/tests/components/inbox.test.tsx +139 -0
- package/tests/components/language-switcher.test.tsx +298 -0
- package/tests/components/layout-containers.test.tsx +15 -0
- package/tests/components/layout-i18n.test.tsx +187 -0
- package/tests/components/loading.test.tsx +25 -0
- package/tests/components/navigation-menu.test.tsx +355 -0
- package/tests/components/page-harness.test.tsx +318 -0
- package/tests/components/primitive-labels.test.tsx +80 -0
- package/tests/components/sidebar-permissions.test.tsx +110 -0
- package/tests/components/sidebar-preference.test.tsx +42 -0
- package/tests/fixtures/theme-tokens.html +12 -0
- package/tests/fixtures/theme-tokens.tsx +111 -0
- package/tests/logic/account-permissions.test.tsx +204 -0
- package/tests/logic/app-locale-coverage.test.ts +136 -0
- package/tests/logic/app-server.test.ts +1589 -0
- package/tests/logic/asset-url-build.test.ts +106 -0
- package/tests/logic/client-auth.test.tsx +122 -0
- package/tests/logic/client-plugin-registry.test.ts +63 -0
- package/tests/logic/client-route-recovery.test.tsx +80 -0
- package/tests/logic/client-routes.test.ts +126 -0
- package/tests/logic/client-runtime.test.ts +112 -0
- package/tests/logic/client-settings.test.tsx +841 -0
- package/tests/logic/client-shell.test.tsx +466 -0
- package/tests/logic/client-theme.test.tsx +441 -0
- package/tests/logic/config.test.ts +197 -0
- package/tests/logic/dev-client-watch.test.ts +108 -0
- package/tests/logic/dev-routes-production-build.test.ts +168 -0
- package/tests/logic/device-code-migration.test.ts +70 -0
- package/tests/logic/lifecycle.test.ts +221 -0
- package/tests/logic/plugin-commands.test.ts +69 -0
- package/tests/logic/plugin-page-authz.test.ts +76 -0
- package/tests/logic/route-navigation.test.ts +66 -0
- package/tests/logic/route-overlay.test.tsx +353 -0
- package/tests/logic/server-imports.test.ts +88 -0
- package/tests/logic/tailwind-sources.test.ts +151 -0
- package/tests/logic/template-package-name.test.ts +88 -0
- package/tests/logic/theme-preferences.test.ts +86 -0
- package/tests/logic/theme-tokens.test.ts +248 -0
- package/tests/logic/toaster.test.tsx +108 -0
- package/tests/logic/user-menu-sign-out.test.tsx +98 -0
- package/tests/setup/client-config.ts +27 -0
- package/tsconfig.json +11 -0
- package/tsconfig.node.json +12 -0
- package/tsconfig.server.json +19 -0
- package/vite.config.ts +92 -0
- package/vitest.config.ts +37 -0
- package/README.md +0 -3
package/Dockerfile
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# syntax=docker/dockerfile:1
|
|
2
|
+
#
|
|
3
|
+
# Builds this application into a production image, either from its sources or from a `dist/` already built.
|
|
4
|
+
#
|
|
5
|
+
# From source, in a generated application, run from the project root:
|
|
6
|
+
#
|
|
7
|
+
# docker build -t my-app .
|
|
8
|
+
#
|
|
9
|
+
# From source in the nocobase3 repository, the build context has to be the repository root, because the template
|
|
10
|
+
# resolves its `workspace:` dependencies from there:
|
|
11
|
+
#
|
|
12
|
+
# docker build -f packages/templates/app-template-default/Dockerfile \
|
|
13
|
+
# --build-arg APP_DIR=packages/templates/app-template-default -t my-app .
|
|
14
|
+
#
|
|
15
|
+
# From a prebuilt `dist/`, which works in the template's own directory too. Build it for the image's platform first:
|
|
16
|
+
#
|
|
17
|
+
# pnpm build --target linux-x64
|
|
18
|
+
# docker build --platform linux/amd64 --build-arg DIST=prebuilt -t my-app .
|
|
19
|
+
#
|
|
20
|
+
# The image holds code and production dependencies only. Mount the runtime configuration at /app/config.yml and
|
|
21
|
+
# persistent data at /app/storage; neither belongs in the image.
|
|
22
|
+
|
|
23
|
+
ARG NODE_VERSION=24.15.0
|
|
24
|
+
# `source` builds `dist/` inside the image; `prebuilt` takes the one in the build context.
|
|
25
|
+
ARG DIST=source
|
|
26
|
+
|
|
27
|
+
# The build runs on the builder's own architecture and cross-targets the image platform through `pnpm build --target`,
|
|
28
|
+
# which fetches the matching native binaries. Building under emulation would compile every TypeScript package and the
|
|
29
|
+
# client bundle there too, many times slower, while only the `.node` files actually differ between platforms.
|
|
30
|
+
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION}-bookworm AS dist-source
|
|
31
|
+
ARG PNPM_VERSION=11.7.0
|
|
32
|
+
RUN npm install --global pnpm@${PNPM_VERSION} \
|
|
33
|
+
&& pnpm config set store-dir /pnpm/store
|
|
34
|
+
|
|
35
|
+
# `.` in a generated application; the template's directory when building inside the nocobase3 repository.
|
|
36
|
+
ARG APP_DIR=.
|
|
37
|
+
WORKDIR /src
|
|
38
|
+
# A local `dist/` is in the context for DIST=prebuilt; a source build replaces it, so it is not copied here.
|
|
39
|
+
COPY --exclude=dist --exclude=packages/templates/*/dist . .
|
|
40
|
+
RUN test -f pnpm-lock.yaml || { \
|
|
41
|
+
echo 'No pnpm-lock.yaml in the build context. Inside the nocobase3 repository, build from the repository root' \
|
|
42
|
+
'with -f <template>/Dockerfile --build-arg APP_DIR=<template>, or build dist/ first and pass' \
|
|
43
|
+
'--build-arg DIST=prebuilt.' >&2; \
|
|
44
|
+
exit 1; \
|
|
45
|
+
}
|
|
46
|
+
# Installs this application and the workspace packages it depends on, and nothing else in the repository. The
|
|
47
|
+
# application is selected by its package name, which in a generated application is simply the root project.
|
|
48
|
+
RUN --mount=type=cache,target=/pnpm/store \
|
|
49
|
+
pnpm install --frozen-lockfile --filter "$(node -p "require('./${APP_DIR}/package.json').name")..."
|
|
50
|
+
# `pnpm build` typechecks and bundles the client before it builds the workspace packages the server needs, so on a
|
|
51
|
+
# clean checkout their `dist` has to exist first. In a generated application nothing matches and this does nothing.
|
|
52
|
+
RUN pnpm --filter "$(node -p "require('./${APP_DIR}/package.json').name")^..." build
|
|
53
|
+
|
|
54
|
+
WORKDIR /src/${APP_DIR}
|
|
55
|
+
ARG TARGETARCH
|
|
56
|
+
# Only source builds consume this; prebuilt assets already contain their base URL.
|
|
57
|
+
ARG CDN_BASE_URL
|
|
58
|
+
RUN --mount=type=cache,target=/pnpm/store \
|
|
59
|
+
case "${TARGETARCH}" in \
|
|
60
|
+
amd64) target=linux-x64 ;; \
|
|
61
|
+
arm64) target=linux-arm64 ;; \
|
|
62
|
+
*) echo "Unsupported TARGETARCH: ${TARGETARCH}" >&2; exit 1 ;; \
|
|
63
|
+
esac \
|
|
64
|
+
&& NOCOBASE_SKIP_WORKSPACE_DEPENDENCY_BUILD=1 \
|
|
65
|
+
pnpm build --target "${target}" --node-version "$(node -p "process.versions.node.split('.')[0]")"
|
|
66
|
+
|
|
67
|
+
# A `dist/` built outside the image was built for whatever `--target` it was given, so it is checked against the
|
|
68
|
+
# image before anything is copied: a darwin or musl binary would build a working image that fails only when the
|
|
69
|
+
# database driver loads. `dist/.env` never reaches this stage — see Dockerfile.dockerignore.
|
|
70
|
+
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION}-bookworm-slim AS dist-prebuilt
|
|
71
|
+
ARG APP_DIR=.
|
|
72
|
+
ARG TARGETARCH
|
|
73
|
+
WORKDIR /src/${APP_DIR}
|
|
74
|
+
COPY ${APP_DIR}/dist/ ./dist/
|
|
75
|
+
COPY ${APP_DIR}/config.example.yml ./config.example.yml
|
|
76
|
+
RUN node <<'EOF'
|
|
77
|
+
const fs = require('node:fs');
|
|
78
|
+
const fail = (message) => {
|
|
79
|
+
console.error(message);
|
|
80
|
+
process.exit(1);
|
|
81
|
+
};
|
|
82
|
+
if (!fs.existsSync('dist/package.json') || !fs.existsSync('dist/node_modules')) {
|
|
83
|
+
fail('dist/ is not a complete production build. Run pnpm build --target <platform> first.');
|
|
84
|
+
}
|
|
85
|
+
const target = JSON.parse(fs.readFileSync('dist/package.json', 'utf8')).nocobase?.buildTarget ?? {};
|
|
86
|
+
const arch = { amd64: 'x64', arm64: 'arm64' }[process.env.TARGETARCH];
|
|
87
|
+
const nodeMajor = Number(process.versions.node.split('.')[0]);
|
|
88
|
+
if (target.platform !== 'linux' || target.arch !== arch || target.libc !== 'glibc' || target.nodeMajor !== nodeMajor) {
|
|
89
|
+
// Docker picks the image platform before this stage runs and defaults to the builder's own architecture, so a
|
|
90
|
+
// dist/ built for a deployment server usually just needs the image to say the same thing.
|
|
91
|
+
const platform = { x64: 'linux/amd64', arm64: 'linux/arm64' }[target.arch];
|
|
92
|
+
const imageFix =
|
|
93
|
+
target.platform === 'linux' && target.libc === 'glibc' && target.nodeMajor === nodeMajor && platform
|
|
94
|
+
? `To build a ${platform} image from this dist/, add --platform ${platform} to docker build. `
|
|
95
|
+
: '';
|
|
96
|
+
fail(
|
|
97
|
+
`dist/ was built for ${JSON.stringify(target)}, but this image is linux/${arch} glibc with Node ${nodeMajor}. ` +
|
|
98
|
+
imageFix +
|
|
99
|
+
`To keep this image's platform, rebuild with pnpm build --target linux-${arch} --node-version ${nodeMajor}.`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
// The container chooses its mount path at run time, so the client must not be tied to one. A dist/ from an
|
|
103
|
+
// @nocobase/app-cli that predates relocatable builds has its build-time path compiled in.
|
|
104
|
+
if (JSON.parse(fs.readFileSync('dist/package.json', 'utf8')).nocobase?.relocatable !== true) {
|
|
105
|
+
fail('dist/ was built by an @nocobase/app-cli that ties the client to one mount path. Upgrade it and rebuild dist/.');
|
|
106
|
+
}
|
|
107
|
+
EOF
|
|
108
|
+
|
|
109
|
+
FROM dist-${DIST} AS dist
|
|
110
|
+
|
|
111
|
+
FROM node:${NODE_VERSION}-bookworm-slim AS runtime
|
|
112
|
+
ARG APP_DIR=.
|
|
113
|
+
# The client is not tied to a mount path; the container picks one at run time with -e APP_BASE_PATH=<path>. The default
|
|
114
|
+
# is spelled out rather than left to the server because the health check below has to probe the same path.
|
|
115
|
+
ENV NODE_ENV=production \
|
|
116
|
+
APP_BASE_PATH=/main \
|
|
117
|
+
APP_SERVER_HOST=0.0.0.0 \
|
|
118
|
+
APP_SERVER_PORT=13000 \
|
|
119
|
+
APP_CONFIG_FILE=/app/config.yml
|
|
120
|
+
|
|
121
|
+
# The runtime takes the directory above `dist` as its deployment root, so storage resolves to /app/storage.
|
|
122
|
+
WORKDIR /app
|
|
123
|
+
COPY --from=dist --chown=node:node /src/${APP_DIR}/dist/ ./dist/
|
|
124
|
+
# Kept as a starting point for config.yml; the real file, with its secrets, is supplied at runtime.
|
|
125
|
+
COPY --from=dist /src/${APP_DIR}/config.example.yml ./config.example.yml
|
|
126
|
+
RUN mkdir -p storage && chown node:node storage
|
|
127
|
+
USER node
|
|
128
|
+
EXPOSE 13000
|
|
129
|
+
# The image has no curl, so the check uses Node's fetch against the application's health endpoint.
|
|
130
|
+
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
|
|
131
|
+
CMD ["node", "-e", "fetch(`http://127.0.0.1:${process.env.APP_SERVER_PORT}${(process.env.APP_BASE_PATH || '').replace(/\\/+$/, '')}/api/healthz`, { signal: AbortSignal.timeout(3000) }).then(async (r) => process.exit(r.ok && (await r.json()).ok === true ? 0 : 1)).catch(() => process.exit(1))"]
|
|
132
|
+
CMD ["node", "dist/server/standalone.js"]
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Read by BuildKit for the Dockerfile beside it, whichever directory is the build context. Patterns are relative to
|
|
2
|
+
# that context, which is the application root in a generated application and the repository root inside nocobase3,
|
|
3
|
+
# so every entry is written to match at any depth — except build output, which is excluded where builds write it.
|
|
4
|
+
|
|
5
|
+
# Rebuilt inside the image.
|
|
6
|
+
**/node_modules
|
|
7
|
+
**/.pnpm-store
|
|
8
|
+
|
|
9
|
+
# Build output inside nocobase3: each workspace package's and the documentation sites'. Named by location rather than
|
|
10
|
+
# as `**/dist`, which would also drop a source directory that happens to be called `dist` — app-cli's `dist` commands
|
|
11
|
+
# are one — and fail the in-image build on a missing import with nothing pointing here.
|
|
12
|
+
packages/*/*/dist
|
|
13
|
+
docs/dist
|
|
14
|
+
ui-library/dist
|
|
15
|
+
|
|
16
|
+
# Runtime configuration, secrets, and data. They are mounted into the container, never copied into the image.
|
|
17
|
+
**/config.yml
|
|
18
|
+
**/config.toml
|
|
19
|
+
**/.env
|
|
20
|
+
**/.env.*
|
|
21
|
+
**/storage
|
|
22
|
+
**/database.sqlite*
|
|
23
|
+
|
|
24
|
+
# Local tooling and test output.
|
|
25
|
+
.git
|
|
26
|
+
**/.agents
|
|
27
|
+
**/.claude
|
|
28
|
+
**/.agent-annotations
|
|
29
|
+
**/coverage
|
|
30
|
+
**/playwright-report
|
|
31
|
+
**/test-results
|
|
32
|
+
**/logs
|
|
33
|
+
**/*.log
|
|
34
|
+
**/.DS_Store
|
|
35
|
+
|
|
36
|
+
# The application's own build, for DIST=prebuilt. Re-included last and whole, because the rules above would otherwise
|
|
37
|
+
# strip dependency directories inside it that happen to share a name with them, such as langchain's `storage/`.
|
|
38
|
+
!dist
|
|
39
|
+
!dist/**
|
|
40
|
+
!packages/templates/*/dist
|
|
41
|
+
!packages/templates/*/dist/**
|
|
42
|
+
|
|
43
|
+
# Except the server settings `pnpm build` extracts from local .env files, which can include DB_PASSWORD.
|
|
44
|
+
dist/.env
|
|
45
|
+
packages/templates/*/dist/.env
|