@emseepea/create-react-ui-server 0.0.21 → 0.0.23
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/README.md +16 -0
- package/initializer-dist/template/.dockerignore +17 -0
- package/initializer-dist/template/Dockerfile +19 -0
- package/initializer-dist/template/README.md +16 -0
- package/initializer-dist/template/package.json +6 -5
- package/initializer-dist/template/src/server.tsx +2 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -70,6 +70,22 @@ Open
|
|
|
70
70
|
|
|
71
71
|
The page previews a sample pea planting plan only. It does not send or store a report.
|
|
72
72
|
|
|
73
|
+
## Build a production container
|
|
74
|
+
|
|
75
|
+
Run `npm install` first so the project has a lockfile. Then run:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
npm run container:build
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The image is for a production deployment behind a trusted proxy. It starts with
|
|
82
|
+
the fail-closed production profile and needs a runtime-mounted deployment
|
|
83
|
+
configuration file. Keep secrets in your platform's runtime secret store, not in
|
|
84
|
+
the Dockerfile, build arguments, or deployment configuration file.
|
|
85
|
+
|
|
86
|
+
For the production proxy, runtime configuration, and hardening requirements, see
|
|
87
|
+
the [container guide](https://emseepea.github.io/emseepea/examples/#build-a-production-container).
|
|
88
|
+
|
|
73
89
|
## Add Feedback
|
|
74
90
|
|
|
75
91
|
Install `@emseepea/feedback` when this server needs a detailed one-way
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
FROM docker.io/library/node:24.21.0-trixie-slim@sha256:db3ae80f5d8df06e04dabdf7b44cbf008d32de168205fa0294444aabbc08c590 AS build
|
|
2
|
+
WORKDIR /app
|
|
3
|
+
COPY . .
|
|
4
|
+
RUN test "$(node --version)" = "v24.21.0" \
|
|
5
|
+
&& test -f package-lock.json \
|
|
6
|
+
&& npm ci --ignore-scripts \
|
|
7
|
+
&& npm run build \
|
|
8
|
+
&& npm prune --omit=dev --ignore-scripts
|
|
9
|
+
|
|
10
|
+
FROM gcr.io/distroless/nodejs24-debian13:nonroot@sha256:7781e8b4fccf59240bd539af6738cccf8dad4be303165c3a1fa065c48699b937
|
|
11
|
+
WORKDIR /app
|
|
12
|
+
ENV EMSEEPEA_DEPLOYMENT_MODE=production-behind-proxy
|
|
13
|
+
COPY --from=build --chown=65532:65532 /app/package.json ./package.json
|
|
14
|
+
COPY --from=build --chown=65532:65532 /app/node_modules ./node_modules
|
|
15
|
+
COPY --from=build --chown=65532:65532 /app/dist ./dist
|
|
16
|
+
USER 65532:65532
|
|
17
|
+
EXPOSE 3001
|
|
18
|
+
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 CMD ["/nodejs/bin/node", "-e", "const port=process.env.PORT||'3001';fetch(`http://127.0.0.1:${port}/healthz`).then((r)=>process.exit(r.ok?0:1),()=>process.exit(1));"]
|
|
19
|
+
CMD ["dist/server.js"]
|
|
@@ -52,6 +52,22 @@ Open
|
|
|
52
52
|
|
|
53
53
|
The page previews a sample pea planting plan only. It does not send or store a report.
|
|
54
54
|
|
|
55
|
+
## Build a production container
|
|
56
|
+
|
|
57
|
+
Run `npm install` first so the project has a lockfile. Then run:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
npm run container:build
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The image is for a production deployment behind a trusted proxy. It starts with
|
|
64
|
+
the fail-closed production profile and needs a runtime-mounted deployment
|
|
65
|
+
configuration file. Keep secrets in your platform's runtime secret store, not in
|
|
66
|
+
the Dockerfile, build arguments, or deployment configuration file.
|
|
67
|
+
|
|
68
|
+
For the production proxy, runtime configuration, and hardening requirements, see
|
|
69
|
+
the [container guide](https://emseepea.github.io/emseepea/examples/#build-a-production-container).
|
|
70
|
+
|
|
55
71
|
## Add Feedback
|
|
56
72
|
|
|
57
73
|
Install `@emseepea/feedback` when this server needs a detailed one-way
|
|
@@ -11,13 +11,14 @@
|
|
|
11
11
|
"test:built": "node --test test/*.test.mjs",
|
|
12
12
|
"test:llm": "npm run build && npm run test:llm:built",
|
|
13
13
|
"test:llm:built": "emseepea-test eval",
|
|
14
|
-
"lint": "oxlint src test eval test-support"
|
|
14
|
+
"lint": "oxlint src test eval test-support",
|
|
15
|
+
"container:build": "docker build --tag emseepea-server:local ."
|
|
15
16
|
},
|
|
16
17
|
"devDependencies": {
|
|
17
|
-
"@emseepea/feedback": "0.2.
|
|
18
|
+
"@emseepea/feedback": "0.2.6",
|
|
18
19
|
"playwright": "1.62.1",
|
|
19
20
|
"axe-core": "4.13.0",
|
|
20
|
-
"@emseepea/testing": "0.9.
|
|
21
|
+
"@emseepea/testing": "0.9.9",
|
|
21
22
|
"@types/node": "24.13.3",
|
|
22
23
|
"@types/react": "19.2.18",
|
|
23
24
|
"@types/react-dom": "19.2.5",
|
|
@@ -30,8 +31,8 @@
|
|
|
30
31
|
},
|
|
31
32
|
"private": true,
|
|
32
33
|
"dependencies": {
|
|
33
|
-
"@emseepea/react": "0.0.
|
|
34
|
-
"@emseepea/server": "0.
|
|
34
|
+
"@emseepea/react": "0.0.19",
|
|
35
|
+
"@emseepea/server": "0.10.0",
|
|
35
36
|
"@emseepea/tailwind": "0.0.2",
|
|
36
37
|
"react": "19.2.8",
|
|
37
38
|
"react-dom": "19.2.8"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { serveEmseepea } from "@emseepea/server";
|
|
1
|
+
import { loadDeploymentProfile, serveEmseepea } from "@emseepea/server";
|
|
2
2
|
import { createReactUiServer } from "./app.js";
|
|
3
3
|
|
|
4
|
-
const running = await serveEmseepea(await createReactUiServer(), {
|
|
4
|
+
const running = await serveEmseepea(await createReactUiServer({ deployment: loadDeploymentProfile() }), {
|
|
5
5
|
port: Number.parseInt(process.env.PORT ?? "3001", 10),
|
|
6
6
|
});
|
|
7
7
|
console.log(`Em See Pea React UI example listening at ${running.url}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emseepea/create-react-ui-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "Create an Em See Pea server with an accessible React form.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
"prepack": "npm run build:initializer"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@emseepea/feedback": "0.2.
|
|
22
|
-
"@emseepea/react": "0.0.
|
|
23
|
-
"@emseepea/server": "0.
|
|
21
|
+
"@emseepea/feedback": "0.2.6",
|
|
22
|
+
"@emseepea/react": "0.0.19",
|
|
23
|
+
"@emseepea/server": "0.10.0",
|
|
24
24
|
"@emseepea/tailwind": "0.0.2",
|
|
25
25
|
"react": "19.2.8",
|
|
26
26
|
"react-dom": "19.2.8",
|
|
27
27
|
"@emseepea/example-ui-shared": "0.0.0",
|
|
28
28
|
"playwright": "1.62.1",
|
|
29
29
|
"axe-core": "4.13.0",
|
|
30
|
-
"@emseepea/testing": "0.9.
|
|
30
|
+
"@emseepea/testing": "0.9.9",
|
|
31
31
|
"@types/node": "24.13.3",
|
|
32
32
|
"@types/react": "19.2.18",
|
|
33
33
|
"@types/react-dom": "19.2.5",
|