underpost 2.99.4 → 2.99.6
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/.env.development +0 -3
- package/.env.production +1 -3
- package/.env.test +0 -3
- package/README.md +3 -3
- package/baremetal/commission-workflows.json +93 -4
- package/bin/deploy.js +56 -45
- package/cli.md +45 -28
- package/examples/static-page/README.md +101 -357
- package/examples/static-page/ssr-components/CustomPage.js +1 -13
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +40 -0
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +40 -0
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +2 -2
- package/package.json +3 -4
- package/scripts/disk-devices.sh +13 -0
- package/scripts/maas-setup.sh +13 -9
- package/scripts/rocky-kickstart.sh +294 -0
- package/src/cli/baremetal.js +657 -263
- package/src/cli/cloud-init.js +120 -120
- package/src/cli/env.js +4 -1
- package/src/cli/image.js +4 -37
- package/src/cli/index.js +56 -11
- package/src/cli/kickstart.js +149 -0
- package/src/cli/repository.js +3 -1
- package/src/cli/run.js +56 -10
- package/src/cli/secrets.js +0 -34
- package/src/cli/static.js +23 -23
- package/src/client/components/core/Docs.js +22 -3
- package/src/index.js +30 -5
- package/src/server/backup.js +11 -4
- package/src/server/client-build-docs.js +1 -1
- package/src/server/conf.js +0 -22
- package/src/server/cron.js +339 -130
- package/src/server/dns.js +10 -0
- package/src/server/logger.js +22 -27
- package/src/server/tls.js +14 -14
- package/examples/static-page/QUICK-REFERENCE.md +0 -481
- package/examples/static-page/STATIC-GENERATOR-GUIDE.md +0 -757
|
@@ -1,406 +1,150 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Static Page Example
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Contents
|
|
6
|
-
|
|
7
|
-
### Documentation
|
|
8
|
-
|
|
9
|
-
- **[STATIC-GENERATOR-GUIDE.md](./STATIC-GENERATOR-GUIDE.md)** - Complete guide covering all features, best practices, and advanced usage patterns
|
|
10
|
-
|
|
11
|
-
### Configuration Examples
|
|
12
|
-
|
|
13
|
-
- **[static-config-example.json](./static-page/static-config-example.json)** - Fully documented configuration file template with all available options
|
|
14
|
-
|
|
15
|
-
### SSR Component Examples
|
|
16
|
-
|
|
17
|
-
- **[ssr-components/CustomPage.js](./ssr-components/CustomPage.js)** - Complete example of a custom landing page with:
|
|
18
|
-
- Semantic HTML structure
|
|
19
|
-
- Accessibility features
|
|
20
|
-
- Responsive design
|
|
21
|
-
- Progressive enhancement
|
|
22
|
-
- Inline critical CSS
|
|
23
|
-
- Interactive JavaScript
|
|
3
|
+
Generate static HTML pages using the `underpost static` CLI.
|
|
24
4
|
|
|
25
5
|
## Quick Start
|
|
26
6
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
7
|
+
```sh
|
|
8
|
+
# From the project root directory:
|
|
9
|
+
underpost static --page ./examples/static-page/ssr-components/CustomPage.js \
|
|
10
|
+
--output-path ./public/default.net/example.html
|
|
31
11
|
```
|
|
32
12
|
|
|
33
|
-
|
|
13
|
+
## Using a Config File
|
|
34
14
|
|
|
35
|
-
|
|
15
|
+
A JSON config file lets you define all options in one place instead of passing CLI flags.
|
|
36
16
|
|
|
37
|
-
|
|
17
|
+
**Generate a starter config:**
|
|
38
18
|
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
"page": "./src/client/ssr/body/YourPage.js",
|
|
42
|
-
"outputPath": "./dist/index.html",
|
|
43
|
-
"metadata": {
|
|
44
|
-
"title": "Your App Title",
|
|
45
|
-
"description": "Your app description"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
19
|
+
```sh
|
|
20
|
+
underpost static --generate-config ./static-config.json
|
|
48
21
|
```
|
|
49
22
|
|
|
50
|
-
|
|
23
|
+
**Build from the included example config:**
|
|
51
24
|
|
|
52
|
-
```
|
|
53
|
-
underpost static --config-file ./
|
|
25
|
+
```sh
|
|
26
|
+
underpost static --config-file ./examples/static-page/static-config-example.json
|
|
54
27
|
```
|
|
55
28
|
|
|
56
|
-
##
|
|
29
|
+
## Preview with Static Server
|
|
57
30
|
|
|
58
|
-
|
|
31
|
+
Use `--run-sv` to start a standalone Express static file server that serves the build output directory, so you can preview your generated pages in a browser.
|
|
59
32
|
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Landing Page with SEO
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
underpost static \
|
|
71
|
-
--page ./examples/static-page/ssr-components/CustomPage.js \
|
|
72
|
-
--output-path ./dist/landing.html \
|
|
73
|
-
--title "Welcome to My App" \
|
|
74
|
-
--description "The best app for your needs" \
|
|
75
|
-
--keywords "app,solution,innovation" \
|
|
76
|
-
--theme-color "#667eea" \
|
|
77
|
-
--canonical-url "https://myapp.com"
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### Complete Customization
|
|
33
|
+
```sh
|
|
34
|
+
# Build and serve on default port 5000:
|
|
35
|
+
underpost static --page ./examples/static-page/ssr-components/CustomPage.js \
|
|
36
|
+
--output-path ./dist/index.html \
|
|
37
|
+
--run-sv
|
|
81
38
|
|
|
82
|
-
|
|
39
|
+
# Build and serve on a custom port:
|
|
40
|
+
underpost static --page ./examples/static-page/ssr-components/CustomPage.js \
|
|
41
|
+
--output-path ./dist/index.html \
|
|
42
|
+
--run-sv 3000
|
|
83
43
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
cp ./examples/static-page/static-config-example.json ./my-config.json
|
|
44
|
+
# Serve an existing build directory without rebuilding:
|
|
45
|
+
underpost static --output-path ./dist/index.html --run-sv
|
|
87
46
|
|
|
88
|
-
#
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
# Build
|
|
92
|
-
underpost static --config-file ./my-config.json
|
|
47
|
+
# Serve the current working directory:
|
|
48
|
+
underpost static --run-sv 8080
|
|
93
49
|
```
|
|
94
50
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
### 1. Complete Configuration Example
|
|
98
|
-
|
|
99
|
-
**File:** `static-config-example.json`
|
|
100
|
-
|
|
101
|
-
**What it demonstrates:**
|
|
102
|
-
- Complete metadata configuration
|
|
103
|
-
- Script injection (head and body)
|
|
104
|
-
- Stylesheet management
|
|
105
|
-
- Icon configuration
|
|
106
|
-
- SSR component inclusion
|
|
107
|
-
- Microdata/structured data
|
|
108
|
-
- Custom payload injection
|
|
109
|
-
|
|
110
|
-
**Use case:** Production-ready web application with full SEO and PWA support
|
|
111
|
-
|
|
112
|
-
### 2. Custom Landing Page Component
|
|
113
|
-
|
|
114
|
-
**File:** `ssr-components/CustomPage.js`
|
|
115
|
-
|
|
116
|
-
**What it demonstrates:**
|
|
117
|
-
- Hero section with call-to-action
|
|
118
|
-
- Feature showcase grid
|
|
119
|
-
- Content sections
|
|
120
|
-
- Contact form
|
|
121
|
-
- Footer with links
|
|
122
|
-
- Responsive design
|
|
123
|
-
- Accessibility features
|
|
124
|
-
- Progressive enhancement
|
|
125
|
-
|
|
126
|
-
**Use case:** Marketing landing page or product showcase
|
|
127
|
-
|
|
128
|
-
## Configuration Options Reference
|
|
129
|
-
|
|
130
|
-
### Metadata Options
|
|
131
|
-
|
|
132
|
-
```json
|
|
133
|
-
{
|
|
134
|
-
"metadata": {
|
|
135
|
-
"title": "Page title",
|
|
136
|
-
"description": "SEO description",
|
|
137
|
-
"keywords": ["keyword1", "keyword2"],
|
|
138
|
-
"author": "Author name",
|
|
139
|
-
"themeColor": "#ffffff",
|
|
140
|
-
"canonicalURL": "https://example.com",
|
|
141
|
-
"thumbnail": "https://example.com/image.png",
|
|
142
|
-
"locale": "en-US",
|
|
143
|
-
"siteName": "Site Name"
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
```
|
|
51
|
+
When `--output-path` is provided, the server serves the directory containing the output file (e.g. `./dist/`). Otherwise it serves the current working directory.
|
|
147
52
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
```json
|
|
151
|
-
{
|
|
152
|
-
"scripts": {
|
|
153
|
-
"head": [
|
|
154
|
-
{
|
|
155
|
-
"src": "https://cdn.example.com/script.js",
|
|
156
|
-
"async": true,
|
|
157
|
-
"integrity": "sha384-...",
|
|
158
|
-
"crossorigin": "anonymous"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"content": "window.config = {};",
|
|
162
|
-
"type": "text/javascript"
|
|
163
|
-
}
|
|
164
|
-
],
|
|
165
|
-
"body": [
|
|
166
|
-
{
|
|
167
|
-
"src": "/app.js",
|
|
168
|
-
"type": "module",
|
|
169
|
-
"defer": true
|
|
170
|
-
}
|
|
171
|
-
]
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
```
|
|
53
|
+
## Config File Reference
|
|
175
54
|
|
|
176
|
-
|
|
55
|
+
See [`static-config-example.json`](./static-config-example.json) for a complete working example.
|
|
177
56
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
57
|
+
| Field | Type | Description |
|
|
58
|
+
|-------|------|-------------|
|
|
59
|
+
| `page` | `string` | Path to the SSR component to render |
|
|
60
|
+
| `outputPath` | `string` | Output HTML file path |
|
|
61
|
+
| `buildPath` | `string` | Base path for static documents or assets (default: `"/"`) |
|
|
62
|
+
| `env` | `string` | `"production"` or `"development"` |
|
|
63
|
+
| `minify` | `boolean` | Minify HTML output |
|
|
64
|
+
| `lang` | `string` | HTML `lang` attribute |
|
|
65
|
+
| `dir` | `string` | HTML `dir` attribute (`ltr`/`rtl`) |
|
|
66
|
+
| `metadata` | `object` | SEO metadata (title, description, keywords, author, themeColor, canonicalURL, thumbnail, locale, siteName) |
|
|
67
|
+
| `scripts` | `object` | `{ head: [...], body: [...] }` — inline or external scripts |
|
|
68
|
+
| `styles` | `array` | Inline (`content`) or external (`href`) stylesheets |
|
|
69
|
+
| `icons` | `object` | `favicon`, `appleTouchIcon`, `manifest` paths |
|
|
70
|
+
| `headComponents` | `array` | SSR component paths injected into `<head>` |
|
|
71
|
+
| `bodyComponents` | `array` | SSR component paths injected into `<body>` |
|
|
72
|
+
| `microdata` | `array` | JSON-LD structured data objects |
|
|
73
|
+
| `customPayload` | `object` | Arbitrary data injected into the render payload |
|
|
187
74
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
```json
|
|
191
|
-
{
|
|
192
|
-
"icons": {
|
|
193
|
-
"favicon": "/favicon.ico",
|
|
194
|
-
"appleTouchIcon": "/apple-touch-icon.png",
|
|
195
|
-
"manifest": "/manifest.json",
|
|
196
|
-
"additional": [
|
|
197
|
-
{
|
|
198
|
-
"rel": "icon",
|
|
199
|
-
"type": "image/png",
|
|
200
|
-
"sizes": "32x32",
|
|
201
|
-
"href": "/favicon-32x32.png"
|
|
202
|
-
}
|
|
203
|
-
]
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
```
|
|
75
|
+
## CLI Flags
|
|
207
76
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
```json
|
|
211
|
-
{
|
|
212
|
-
"headComponents": [
|
|
213
|
-
"./src/client/ssr/head/Seo.js",
|
|
214
|
-
"./src/client/ssr/head/Pwa.js"
|
|
215
|
-
],
|
|
216
|
-
"bodyComponents": [
|
|
217
|
-
"./src/client/ssr/body/Header.js"
|
|
218
|
-
]
|
|
219
|
-
}
|
|
220
|
-
```
|
|
77
|
+
Flags override config file values when both are provided.
|
|
221
78
|
|
|
222
|
-
###
|
|
223
|
-
|
|
224
|
-
```json
|
|
225
|
-
{
|
|
226
|
-
"microdata": [
|
|
227
|
-
{
|
|
228
|
-
"@context": "https://schema.org",
|
|
229
|
-
"@type": "WebSite",
|
|
230
|
-
"name": "My Site",
|
|
231
|
-
"url": "https://example.com"
|
|
232
|
-
}
|
|
233
|
-
]
|
|
234
|
-
}
|
|
235
|
-
```
|
|
79
|
+
### Build & Output
|
|
236
80
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
"author": "John Doe",
|
|
249
|
-
"keywords": ["blogging", "tutorial"]
|
|
250
|
-
},
|
|
251
|
-
"microdata": [
|
|
252
|
-
{
|
|
253
|
-
"@context": "https://schema.org",
|
|
254
|
-
"@type": "BlogPosting",
|
|
255
|
-
"headline": "My Blog Post Title",
|
|
256
|
-
"author": {
|
|
257
|
-
"@type": "Person",
|
|
258
|
-
"name": "John Doe"
|
|
259
|
-
},
|
|
260
|
-
"datePublished": "2024-01-01"
|
|
261
|
-
}
|
|
262
|
-
]
|
|
263
|
-
}
|
|
81
|
+
```sh
|
|
82
|
+
underpost static --page <path> # SSR component path
|
|
83
|
+
--output-path <path> # Output file
|
|
84
|
+
--build-path <path> # Base path for assets (default: "/")
|
|
85
|
+
--config-file <path> # JSON config file
|
|
86
|
+
--generate-config [path] # Generate a template config file
|
|
87
|
+
--env <env> # production | development
|
|
88
|
+
--minify / --no-minify # Toggle minification
|
|
89
|
+
--lang <lang> # HTML lang attribute (default: en)
|
|
90
|
+
--dir <dir> # HTML dir attribute (default: ltr)
|
|
91
|
+
--dev # Development mode
|
|
264
92
|
```
|
|
265
93
|
|
|
266
|
-
###
|
|
267
|
-
|
|
268
|
-
```json
|
|
269
|
-
{
|
|
270
|
-
"page": "./src/client/ssr/body/ProductPage.js",
|
|
271
|
-
"outputPath": "./dist/products/widget.html",
|
|
272
|
-
"metadata": {
|
|
273
|
-
"title": "Premium Widget - Buy Now",
|
|
274
|
-
"description": "High-quality widget with free shipping",
|
|
275
|
-
"thumbnail": "https://shop.com/widget.jpg"
|
|
276
|
-
},
|
|
277
|
-
"microdata": [
|
|
278
|
-
{
|
|
279
|
-
"@context": "https://schema.org",
|
|
280
|
-
"@type": "Product",
|
|
281
|
-
"name": "Premium Widget",
|
|
282
|
-
"offers": {
|
|
283
|
-
"@type": "Offer",
|
|
284
|
-
"price": "29.99",
|
|
285
|
-
"priceCurrency": "USD"
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
]
|
|
289
|
-
}
|
|
290
|
-
```
|
|
94
|
+
### Metadata & SEO
|
|
291
95
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
{ "href": "/docs/prism.css" },
|
|
303
|
-
{ "href": "/docs/docs.css" }
|
|
304
|
-
],
|
|
305
|
-
"scripts": {
|
|
306
|
-
"body": [
|
|
307
|
-
{ "src": "/docs/prism.js", "defer": true },
|
|
308
|
-
{ "src": "/docs/search.js", "defer": true }
|
|
309
|
-
]
|
|
310
|
-
}
|
|
311
|
-
}
|
|
96
|
+
```sh
|
|
97
|
+
--title <title> # Page title (deprecated: use --config-file)
|
|
98
|
+
--description <text> # Meta description
|
|
99
|
+
--keywords <a,b,c> # Comma-separated keywords
|
|
100
|
+
--author <name> # Meta author
|
|
101
|
+
--theme-color <color> # Theme color for mobile browsers
|
|
102
|
+
--canonical-url <url> # Canonical URL for SEO
|
|
103
|
+
--thumbnail <url> # Open Graph thumbnail image URL
|
|
104
|
+
--locale <locale> # Page locale (default: en-US)
|
|
105
|
+
--site-name <name> # Site name for Open Graph
|
|
312
106
|
```
|
|
313
107
|
|
|
314
|
-
###
|
|
315
|
-
|
|
316
|
-
```bash
|
|
317
|
-
# English version
|
|
318
|
-
underpost static --config-file ./config-en.json --lang en --dir ltr
|
|
319
|
-
|
|
320
|
-
# Spanish version
|
|
321
|
-
underpost static --config-file ./config-es.json --lang es --dir ltr
|
|
108
|
+
### Scripts & Styles
|
|
322
109
|
|
|
323
|
-
|
|
324
|
-
|
|
110
|
+
```sh
|
|
111
|
+
--head-scripts <paths> # Comma-separated script paths for <head>
|
|
112
|
+
--body-scripts <paths> # Comma-separated script paths for <body>
|
|
113
|
+
--styles <paths> # Comma-separated stylesheet paths
|
|
325
114
|
```
|
|
326
115
|
|
|
327
|
-
|
|
116
|
+
### Icons
|
|
328
117
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
✅ Include structured data (JSON-LD)
|
|
335
|
-
✅ Optimize images in metadata
|
|
336
|
-
|
|
337
|
-
### 2. Performance
|
|
118
|
+
```sh
|
|
119
|
+
--favicon <path> # Favicon path
|
|
120
|
+
--apple-touch-icon <path> # Apple touch icon path
|
|
121
|
+
--manifest <path> # Web manifest path
|
|
122
|
+
```
|
|
338
123
|
|
|
339
|
-
|
|
340
|
-
✅ Use async/defer for scripts
|
|
341
|
-
✅ Inline critical CSS
|
|
342
|
-
✅ Optimize asset loading order
|
|
124
|
+
### SSR Components
|
|
343
125
|
|
|
344
|
-
|
|
126
|
+
```sh
|
|
127
|
+
--head-components <paths> # Comma-separated SSR head component paths
|
|
128
|
+
--body-components <paths> # Comma-separated SSR body component paths
|
|
129
|
+
```
|
|
345
130
|
|
|
346
|
-
|
|
347
|
-
✅ Include ARIA labels
|
|
348
|
-
✅ Ensure keyboard navigation
|
|
349
|
-
✅ Test with screen readers
|
|
131
|
+
### Static Server
|
|
350
132
|
|
|
351
|
-
|
|
133
|
+
```sh
|
|
134
|
+
--run-sv [port] # Start Express static server (default port: 5000)
|
|
135
|
+
```
|
|
352
136
|
|
|
353
|
-
|
|
354
|
-
✅ Add interactive features progressively
|
|
355
|
-
✅ Test on various devices
|
|
356
|
-
✅ Provide fallbacks
|
|
137
|
+
## SSR Component
|
|
357
138
|
|
|
358
|
-
|
|
139
|
+
The page content is defined in an SSR component file. See [`ssr-components/CustomPage.js`](./ssr-components/CustomPage.js) for an example.
|
|
359
140
|
|
|
360
|
-
|
|
141
|
+
A component exports an `SrrComponent` function that returns an HTML template literal:
|
|
361
142
|
|
|
362
|
-
```
|
|
363
|
-
/**
|
|
364
|
-
* Custom Component Template
|
|
365
|
-
* @description Brief description of the component
|
|
366
|
-
*/
|
|
143
|
+
```js
|
|
367
144
|
SrrComponent = () => html`
|
|
368
|
-
<div
|
|
369
|
-
|
|
145
|
+
<div>
|
|
146
|
+
<h1>Hello World</h1>
|
|
147
|
+
<p>Your page content here.</p>
|
|
370
148
|
</div>
|
|
371
|
-
|
|
372
|
-
<style>
|
|
373
|
-
/* Component-specific styles */
|
|
374
|
-
</style>
|
|
375
|
-
|
|
376
|
-
<script>
|
|
377
|
-
// Component-specific JavaScript
|
|
378
|
-
document.addEventListener('DOMContentLoaded', function() {
|
|
379
|
-
// Your code here
|
|
380
|
-
});
|
|
381
|
-
</script>
|
|
382
149
|
`;
|
|
383
150
|
```
|
|
384
|
-
|
|
385
|
-
### Programmatic Usage
|
|
386
|
-
|
|
387
|
-
```javascript
|
|
388
|
-
import UnderpostStatic from './src/cli/static.js';
|
|
389
|
-
|
|
390
|
-
// Generate multiple pages
|
|
391
|
-
const pages = [
|
|
392
|
-
{ slug: 'home', title: 'Home' },
|
|
393
|
-
{ slug: 'about', title: 'About' },
|
|
394
|
-
{ slug: 'contact', title: 'Contact' }
|
|
395
|
-
];
|
|
396
|
-
|
|
397
|
-
for (const page of pages) {
|
|
398
|
-
await UnderpostStatic.API.callback({
|
|
399
|
-
page: `./src/client/ssr/body/${page.slug}.js`,
|
|
400
|
-
outputPath: `./dist/${page.slug}.html`,
|
|
401
|
-
metadata: {
|
|
402
|
-
title: page.title
|
|
403
|
-
}
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
```
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Custom Page SSR Component Example
|
|
3
3
|
* @module examples/ssr-components/CustomPage
|
|
4
|
-
*
|
|
5
|
-
* @description
|
|
6
|
-
* This is an example SSR component demonstrating best practices for creating
|
|
7
|
-
* custom static pages with the Underpost Static Site Generator.
|
|
8
4
|
*/
|
|
9
5
|
|
|
10
6
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* This component demonstrates:
|
|
14
|
-
* - Semantic HTML structure
|
|
15
|
-
* - Accessibility best practices
|
|
16
|
-
* - Responsive design patterns
|
|
17
|
-
* - Progressive enhancement
|
|
18
|
-
* - Clean, maintainable code
|
|
19
|
-
*
|
|
7
|
+
* SSR Component Example for rendering a custom landing page
|
|
20
8
|
* @function SrrComponent
|
|
21
9
|
* @returns {string} HTML string for the page body
|
|
22
10
|
*/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
apiVersion: batch/v1
|
|
2
|
+
kind: CronJob
|
|
3
|
+
metadata:
|
|
4
|
+
name: dd-cron-backup
|
|
5
|
+
namespace: default
|
|
6
|
+
labels:
|
|
7
|
+
app: dd-cron-backup
|
|
8
|
+
managed-by: underpost
|
|
9
|
+
spec:
|
|
10
|
+
schedule: "0 1 * * *"
|
|
11
|
+
concurrencyPolicy: Forbid
|
|
12
|
+
startingDeadlineSeconds: 200
|
|
13
|
+
successfulJobsHistoryLimit: 3
|
|
14
|
+
failedJobsHistoryLimit: 1
|
|
15
|
+
suspend: false
|
|
16
|
+
jobTemplate:
|
|
17
|
+
spec:
|
|
18
|
+
template:
|
|
19
|
+
metadata:
|
|
20
|
+
labels:
|
|
21
|
+
app: dd-cron-backup
|
|
22
|
+
managed-by: underpost
|
|
23
|
+
spec:
|
|
24
|
+
containers:
|
|
25
|
+
- name: dd-cron-backup
|
|
26
|
+
image: underpost/underpost-engine:v2.99.6
|
|
27
|
+
command:
|
|
28
|
+
- /bin/sh
|
|
29
|
+
- -c
|
|
30
|
+
- >
|
|
31
|
+
cd /home/dd/engine && node bin run secret && node bin env dd-cron production && node bin cron --git --dev dd-lampp,dd-cyberia,dd-core,dd-test backup
|
|
32
|
+
volumeMounts:
|
|
33
|
+
- mountPath: /home/dd/engine
|
|
34
|
+
name: underpost-cron-container-volume
|
|
35
|
+
volumes:
|
|
36
|
+
- hostPath:
|
|
37
|
+
path: /home/dd/engine
|
|
38
|
+
type: Directory
|
|
39
|
+
name: underpost-cron-container-volume
|
|
40
|
+
restartPolicy: OnFailure
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
apiVersion: batch/v1
|
|
2
|
+
kind: CronJob
|
|
3
|
+
metadata:
|
|
4
|
+
name: dd-cron-dns
|
|
5
|
+
namespace: default
|
|
6
|
+
labels:
|
|
7
|
+
app: dd-cron-dns
|
|
8
|
+
managed-by: underpost
|
|
9
|
+
spec:
|
|
10
|
+
schedule: "* * * * *"
|
|
11
|
+
concurrencyPolicy: Forbid
|
|
12
|
+
startingDeadlineSeconds: 200
|
|
13
|
+
successfulJobsHistoryLimit: 3
|
|
14
|
+
failedJobsHistoryLimit: 1
|
|
15
|
+
suspend: false
|
|
16
|
+
jobTemplate:
|
|
17
|
+
spec:
|
|
18
|
+
template:
|
|
19
|
+
metadata:
|
|
20
|
+
labels:
|
|
21
|
+
app: dd-cron-dns
|
|
22
|
+
managed-by: underpost
|
|
23
|
+
spec:
|
|
24
|
+
containers:
|
|
25
|
+
- name: dd-cron-dns
|
|
26
|
+
image: underpost/underpost-engine:v2.99.6
|
|
27
|
+
command:
|
|
28
|
+
- /bin/sh
|
|
29
|
+
- -c
|
|
30
|
+
- >
|
|
31
|
+
cd /home/dd/engine && node bin run secret && node bin env dd-cron production && node bin cron --git --dev dd-cron dns
|
|
32
|
+
volumeMounts:
|
|
33
|
+
- mountPath: /home/dd/engine
|
|
34
|
+
name: underpost-cron-container-volume
|
|
35
|
+
volumes:
|
|
36
|
+
- hostPath:
|
|
37
|
+
path: /home/dd/engine
|
|
38
|
+
type: Directory
|
|
39
|
+
name: underpost-cron-container-volume
|
|
40
|
+
restartPolicy: OnFailure
|
|
@@ -17,7 +17,7 @@ spec:
|
|
|
17
17
|
spec:
|
|
18
18
|
containers:
|
|
19
19
|
- name: dd-default-development-blue
|
|
20
|
-
image: localhost/rockylinux9-underpost:v2.99.
|
|
20
|
+
image: localhost/rockylinux9-underpost:v2.99.6
|
|
21
21
|
# resources:
|
|
22
22
|
# requests:
|
|
23
23
|
# memory: "124Ki"
|
|
@@ -100,7 +100,7 @@ spec:
|
|
|
100
100
|
spec:
|
|
101
101
|
containers:
|
|
102
102
|
- name: dd-default-development-green
|
|
103
|
-
image: localhost/rockylinux9-underpost:v2.99.
|
|
103
|
+
image: localhost/rockylinux9-underpost:v2.99.6
|
|
104
104
|
# resources:
|
|
105
105
|
# requests:
|
|
106
106
|
# memory: "124Ki"
|
|
@@ -18,7 +18,7 @@ spec:
|
|
|
18
18
|
spec:
|
|
19
19
|
containers:
|
|
20
20
|
- name: dd-test-development-blue
|
|
21
|
-
image: localhost/rockylinux9-underpost:v2.99.
|
|
21
|
+
image: localhost/rockylinux9-underpost:v2.99.6
|
|
22
22
|
|
|
23
23
|
command:
|
|
24
24
|
- /bin/sh
|
|
@@ -103,7 +103,7 @@ spec:
|
|
|
103
103
|
spec:
|
|
104
104
|
containers:
|
|
105
105
|
- name: dd-test-development-green
|
|
106
|
-
image: localhost/rockylinux9-underpost:v2.99.
|
|
106
|
+
image: localhost/rockylinux9-underpost:v2.99.6
|
|
107
107
|
|
|
108
108
|
command:
|
|
109
109
|
- /bin/sh
|
package/package.json
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
"type": "module",
|
|
3
3
|
"main": "src/index.js",
|
|
4
4
|
"name": "underpost",
|
|
5
|
-
"version": "2.99.
|
|
5
|
+
"version": "2.99.6",
|
|
6
6
|
"description": "pwa api rest template",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"start": "env-cmd -f .env.production node --max-old-space-size=8192 src/server",
|
|
9
9
|
"build": "node bin/deploy build-full-client",
|
|
10
10
|
"test": "env-cmd -f .env.test c8 mocha",
|
|
11
|
-
"pm2": "env-cmd -f .env.production pm2 start src/server.js --node-args=\"--max-old-space-size=8192\" --name engine -- dd-default",
|
|
12
11
|
"dev": "env-cmd -f .env.development nodemon src/server",
|
|
13
12
|
"dev-img": "env-cmd -f .env.development node src/server",
|
|
14
13
|
"prod-img": "env-cmd -f .env.production node src/server",
|
|
@@ -16,13 +15,13 @@
|
|
|
16
15
|
"dev-client": "env-cmd -f .env.development node src/client.dev",
|
|
17
16
|
"dev-proxy": "env-cmd -f .env.development node src/proxy proxy",
|
|
18
17
|
"docs": "jsdoc -c jsdoc.json",
|
|
19
|
-
"install-global": "npm install -g
|
|
18
|
+
"install-global": "npm install -g jsdoc && npm install -g prettier && npm install -g env-cmd",
|
|
20
19
|
"install-test": "npm install -g mocha && npm install -g c8 && npm install -g coveralls",
|
|
21
20
|
"install-underpost": "cp -a $(npm root -g)/underpost/node_modules ./node_modules && npm install --only=dev --ignore-scripts",
|
|
22
21
|
"install": "npm run install-global && npm run install-test",
|
|
23
22
|
"prettier": "prettier --write .",
|
|
24
23
|
"fix": "npm audit fix --force && npm audit",
|
|
25
|
-
"baremetal": "node bin baremetal --dev --commission --
|
|
24
|
+
"baremetal": "node bin baremetal --dev --commission --ls --create-machine"
|
|
26
25
|
},
|
|
27
26
|
"bin": {
|
|
28
27
|
"underpost": "bin/index.js"
|