create-daloy 0.11.0 → 0.24.0
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/bin/create-daloy.mjs +2 -0
- package/package.json +1 -1
- package/templates/bun-basic/package.json +1 -1
- package/templates/cloudflare-worker/package.json +1 -1
- package/templates/deno-basic/deno.json +2 -2
- package/templates/node-basic/_Dockerfile +40 -0
- package/templates/node-basic/_dockerignore +12 -0
- package/templates/node-basic/package.json +1 -1
- package/templates/vercel-edge/package.json +1 -1
package/bin/create-daloy.mjs
CHANGED
|
@@ -59,6 +59,8 @@ const RENAME_ON_COPY = new Map([
|
|
|
59
59
|
["_npmrc", ".npmrc"],
|
|
60
60
|
["_env.example", ".env.example"],
|
|
61
61
|
["_github", ".github"],
|
|
62
|
+
["_Dockerfile", "Dockerfile"],
|
|
63
|
+
["_dockerignore", ".dockerignore"],
|
|
62
64
|
// Directory: holds skill files for AI coding agents under
|
|
63
65
|
// `.agents/skills/<skill-name>/SKILL.md`. Templates author this as
|
|
64
66
|
// `_agents/` so npm pack does not drop the dotfolder during publish.
|
package/package.json
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"gen:openapi": "deno run --allow-net --allow-env --allow-read --allow-write scripts/dump-openapi.ts"
|
|
9
9
|
},
|
|
10
10
|
"imports": {
|
|
11
|
-
"@daloyjs/core": "npm:@daloyjs/core@^0.
|
|
12
|
-
"@daloyjs/core/": "npm:@daloyjs/core@^0.
|
|
11
|
+
"@daloyjs/core": "npm:@daloyjs/core@^0.30.0",
|
|
12
|
+
"@daloyjs/core/": "npm:@daloyjs/core@^0.30.0/",
|
|
13
13
|
"zod": "npm:zod@^4.4.3"
|
|
14
14
|
},
|
|
15
15
|
"compilerOptions": {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# syntax=docker/dockerfile:1.7
|
|
2
|
+
# Container-first defaults for a DaloyJS app (Wave 6 item 4).
|
|
3
|
+
#
|
|
4
|
+
# Hardening shipped out of the box:
|
|
5
|
+
# - Non-root runtime user (uid 1001).
|
|
6
|
+
# - Read-only root filesystem at runtime (use `--read-only` or set
|
|
7
|
+
# `readOnlyRootFilesystem: true` in your orchestrator).
|
|
8
|
+
# - `STOPSIGNAL SIGTERM` so the framework's graceful-shutdown drain
|
|
9
|
+
# (Wave 4) fires on container stop.
|
|
10
|
+
# - `HEALTHCHECK` wired to `app.healthcheck()` / `app.readinesscheck()`
|
|
11
|
+
# (mount the routes via `app.healthcheck()` / `app.readinesscheck()`).
|
|
12
|
+
# - `tini` as PID 1 for proper signal forwarding and zombie reaping.
|
|
13
|
+
|
|
14
|
+
ARG NODE_VERSION=24-alpine
|
|
15
|
+
|
|
16
|
+
FROM node:${NODE_VERSION} AS builder
|
|
17
|
+
WORKDIR /app
|
|
18
|
+
COPY package.json pnpm-lock.yaml* ./
|
|
19
|
+
RUN corepack enable && corepack prepare pnpm@latest --activate && \
|
|
20
|
+
pnpm install --frozen-lockfile --ignore-scripts
|
|
21
|
+
COPY . .
|
|
22
|
+
RUN pnpm build
|
|
23
|
+
|
|
24
|
+
FROM node:${NODE_VERSION} AS runner
|
|
25
|
+
WORKDIR /app
|
|
26
|
+
ENV NODE_ENV=production
|
|
27
|
+
# tini for clean signal handling at PID 1.
|
|
28
|
+
RUN apk add --no-cache tini curl && \
|
|
29
|
+
addgroup -S app -g 1001 && \
|
|
30
|
+
adduser -S app -G app -u 1001
|
|
31
|
+
COPY --from=builder --chown=app:app /app/dist ./dist
|
|
32
|
+
COPY --from=builder --chown=app:app /app/node_modules ./node_modules
|
|
33
|
+
COPY --from=builder --chown=app:app /app/package.json ./package.json
|
|
34
|
+
USER app
|
|
35
|
+
EXPOSE 3000
|
|
36
|
+
STOPSIGNAL SIGTERM
|
|
37
|
+
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
38
|
+
CMD curl -fsS http://127.0.0.1:3000/readyz || exit 1
|
|
39
|
+
ENTRYPOINT ["/sbin/tini", "--"]
|
|
40
|
+
CMD ["node", "dist/index.js"]
|