underpost 3.2.14 → 3.2.21

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/CHANGELOG.md CHANGED
@@ -1,6 +1,62 @@
1
1
  # Changelog
2
2
 
3
- ## 2026-06-02
3
+ ## 2026-06-06
4
+
5
+ ### release
6
+
7
+ - Add options for MongoDB and Valkey configuration in build process ([7dba2a68a](https://github.com/underpostnet/engine/commit/7dba2a68a01dd0dacdf0e1f430170e80f6ce97d8))
8
+
9
+ ### repository
10
+
11
+ - Enhance deployment process: Include deploy ID in logging and update build commands ([aedd99415](https://github.com/underpostnet/engine/commit/aedd994157a5688b13c9f063b9e1446807282213))
12
+ - Add --has-changes option to check for staged or unstaged git changes and update template repo logic ([f479994a4](https://github.com/underpostnet/engine/commit/f479994a40ad3815839cd85f8664390074799c55))
13
+ - Ensure repository directory is created before initialization ([5cb66853f](https://github.com/underpostnet/engine/commit/5cb66853f2623e18edaf8f63de95757cc48d389a))
14
+
15
+ ### docs
16
+
17
+ - Refactor CLI documentation generation: Update command argument and option sections for improved clarity ([fd20febb1](https://github.com/underpostnet/engine/commit/fd20febb125f547b287edd784504185273080a51))
18
+
19
+ ### deploy
20
+
21
+ - Add support for self-signed TLS certificates and related options in deployment scripts ([d03ddf7b7](https://github.com/underpostnet/engine/commit/d03ddf7b758afb9c55fe7c610011fe9e4828d033))
22
+ - Add localProxy option to enable TCP port forwarding and path-based routing ([6b6c03a4c](https://github.com/underpostnet/engine/commit/6b6c03a4c0a990a9b03c234025b3d68deb48f41a))
23
+ - Add exposeLocalPort option for custom local port configuration in deployment ([60fe88b95](https://github.com/underpostnet/engine/commit/60fe88b95e69c744fb53d900edaf6b918f0824bb))
24
+ - Refactor deployment scripts: Update commands in engine-test workflow and add link-local CLI script ([8506dbca4](https://github.com/underpostnet/engine/commit/8506dbca4280e782cb550206f8bf550f9f6f81af))
25
+
26
+ ### cli-run
27
+
28
+ - Add build-cluster-deployment-manifests method and update test-monitor script: Implement deployment manifest building for production and development environments. ([be2c5a71e](https://github.com/underpostnet/engine/commit/be2c5a71e553a65e57fd9f21a5ccb5acaf7b7d58))
29
+ - Add etc-hosts method: Modify /etc/hosts file for local service access ([c4e7ba286](https://github.com/underpostnet/engine/commit/c4e7ba286651f002c1f6be09225c092b0596e4b8))
30
+
31
+ ### monitor
32
+
33
+ - Refactor monitoring and deployment port resolution: Introduce deployStatusPort for consistent internal status port handling and implement findFreePort for ephemeral TCP port allocation. ([735c2c41e](https://github.com/underpostnet/engine/commit/735c2c41e2cfc7c47dd7ce3f0832b80f9c41188f))
34
+ - Add test-monitor script: Implement deployment and monitoring commands for development environment ([a74316ae1](https://github.com/underpostnet/engine/commit/a74316ae140c7917c2923f9f6f63d0ea74859116))
35
+ - Implement reliable two-phase deployment monitoring with internal HTTP status endpoint ([a2b49dcd6](https://github.com/underpostnet/engine/commit/a2b49dcd62ee5056c6d4e5caba0faf867e531269))
36
+ - Improve pod status handling: Exclude 'empty' status from container status checks ([6d18e2872](https://github.com/underpostnet/engine/commit/6d18e28720004eca5dcff8ad61373ac74b46851a))
37
+ - Improve pod status handling: Exclude 'empty' status from advanced pod tracking ([a90400342](https://github.com/underpostnet/engine/commit/a904003428a2a920f56ea409391812a6d3dab794))
38
+
39
+ ### build-template
40
+
41
+ - Add option to update private template repository ([77cbe276a](https://github.com/underpostnet/engine/commit/77cbe276af8f5a3a85c95ab8ad2044b57ee52326))
42
+
43
+ ### runtime-cyberia
44
+
45
+ - Refactor Dockerfiles: Standardize comments and clean up unnecessary lines ([6ae4d0bef](https://github.com/underpostnet/engine/commit/6ae4d0bef71eb31fc56eb66be5e52ba3334b5f13))
46
+
47
+ ### engine-cyberia
48
+
49
+ - Enhance dialogue and quest systems: Add new dialogue entries for Lain, update action types, and revise implementation status in documentation ([67702fa9c](https://github.com/underpostnet/engine/commit/67702fa9c4219fed4742d078f88a52167dd08249))
50
+
51
+ ### cyberia-cli
52
+
53
+ - Add Mongo host override option to import command for Object Layer items ([b181892b4](https://github.com/underpostnet/engine/commit/b181892b48753f7a40ede0346934f6a8b9fd21dc))
54
+
55
+ ### env
56
+
57
+ - Simplify environment variable check: Remove redundant logging for empty env path ([b192cdff4](https://github.com/underpostnet/engine/commit/b192cdff40c2053c651210fbf244be34b74b8376))
58
+
59
+ ## New release v:3.2.14 (2026-06-02)
4
60
 
5
61
  ### runtime-wp
6
62
 
package/CLI-HELP.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Underpost CLI
2
2
 
3
- > underpost ci/cd cli v3.2.14
3
+ > underpost ci/cd cli v3.2.21
4
4
 
5
5
  **Usage:** `underpost [options] [command]`
6
6
 
@@ -46,7 +46,7 @@
46
46
 
47
47
  ## Command reference
48
48
 
49
- ### `underpost new`
49
+ ### underpost new
50
50
 
51
51
  Initializes a new Underpost project, service, or configuration.
52
52
 
@@ -76,7 +76,9 @@ Initializes a new Underpost project, service, or configuration.
76
76
  | `--conf-workflow-id <workflow-id>` | Set custom configuration workflow ID for conf generation |
77
77
  | `-h, --help` | display help for command |
78
78
 
79
- ### `underpost client`
79
+ ---
80
+
81
+ ### underpost client
80
82
 
81
83
  Builds client assets, single replicas, and/or syncs environment ports.
82
84
 
@@ -105,7 +107,9 @@ Builds client assets, single replicas, and/or syncs environment ports.
105
107
  | `--icons-build` | Build icons |
106
108
  | `-h, --help` | display help for command |
107
109
 
108
- ### `underpost start`
110
+ ---
111
+
112
+ ### underpost start
109
113
 
110
114
  Initiates application servers, build pipelines, or other defined services based on the deployment ID.
111
115
 
@@ -130,7 +134,9 @@ Initiates application servers, build pipelines, or other defined services based
130
134
  | `--pull-bundle` | Downloads the pre-built client bundle from Cloudinary via pull-bundle before starting. Use together with --skip-full-build to skip the local build entirely. |
131
135
  | `-h, --help` | display help for command |
132
136
 
133
- ### `underpost clone`
137
+ ---
138
+
139
+ ### underpost clone
134
140
 
135
141
  Clones a specified GitHub repository into the current directory.
136
142
 
@@ -150,7 +156,9 @@ Clones a specified GitHub repository into the current directory.
150
156
  | `--g8` | Uses the g8 repository extension for cloning. |
151
157
  | `-h, --help` | display help for command |
152
158
 
153
- ### `underpost pull`
159
+ ---
160
+
161
+ ### underpost pull
154
162
 
155
163
  Pulls the latest changes from a specified GitHub repository.
156
164
 
@@ -170,7 +178,9 @@ Pulls the latest changes from a specified GitHub repository.
170
178
  | `--g8` | Uses the g8 repository extension for pulling. |
171
179
  | `-h, --help` | display help for command |
172
180
 
173
- ### `underpost cmt`
181
+ ---
182
+
183
+ ### underpost cmt
174
184
 
175
185
  Manages commits to a GitHub repository, supporting various commit types and options.
176
186
 
@@ -209,9 +219,12 @@ Manages commits to a GitHub repository, supporting various commit types and opti
209
219
  | `-p [branch]` | Shows the reflog for the specified branch. |
210
220
  | `--bc <commit-hash>` | Shows branches that contain the specified commit. |
211
221
  | `--is-remote-repo <url-repo>` | Checks whether a remote Git repository URL is reachable. Prints true or false. |
222
+ | `--has-changes` | Prints "1" if there are staged or unstaged git changes in the repository, empty string otherwise. |
212
223
  | `-h, --help` | display help for command |
213
224
 
214
- ### `underpost push`
225
+ ---
226
+
227
+ ### underpost push
215
228
 
216
229
  Pushes committed changes from a local repository to a remote GitHub repository.
217
230
 
@@ -232,7 +245,9 @@ Pushes committed changes from a local repository to a remote GitHub repository.
232
245
  | `--g8` | Uses the g8 repository extension for pushing. |
233
246
  | `-h, --help` | display help for command |
234
247
 
235
- ### `underpost env`
248
+ ---
249
+
250
+ ### underpost env
236
251
 
237
252
  Sets environment variables and configurations related to a specific deployment ID.
238
253
 
@@ -252,7 +267,9 @@ Sets environment variables and configurations related to a specific deployment I
252
267
  | --- | --- |
253
268
  | `-h, --help` | display help for command |
254
269
 
255
- ### `underpost static`
270
+ ---
271
+
272
+ ### underpost static
256
273
 
257
274
  Manages static build of page, bundles, and documentation with comprehensive customization options.
258
275
 
@@ -293,7 +310,9 @@ Manages static build of page, bundles, and documentation with comprehensive cust
293
310
  | `--run-sv [port]` | Start a standalone Express static server to preview the static build (default port: 5000). |
294
311
  | `-h, --help` | display help for command |
295
312
 
296
- ### `underpost config`
313
+ ---
314
+
315
+ ### underpost config
297
316
 
298
317
  Manages Underpost configurations using various operators.
299
318
 
@@ -318,7 +337,9 @@ Manages Underpost configurations using various operators.
318
337
  | `--copy` | Copies the configuration value to the clipboard (only for get operation). |
319
338
  | `-h, --help` | display help for command |
320
339
 
321
- ### `underpost root`
340
+ ---
341
+
342
+ ### underpost root
322
343
 
323
344
  Displays the root path of the npm installation.
324
345
 
@@ -330,7 +351,9 @@ Displays the root path of the npm installation.
330
351
  | --- | --- |
331
352
  | `-h, --help` | display help for command |
332
353
 
333
- ### `underpost ip`
354
+ ---
355
+
356
+ ### underpost ip
334
357
 
335
358
  Displays the current public machine IP addresses.
336
359
 
@@ -361,7 +384,9 @@ Displays the current public machine IP addresses.
361
384
  | `--mac` | Prints the MAC address of the main network interface. |
362
385
  | `-h, --help` | display help for command |
363
386
 
364
- ### `underpost cluster`
387
+ ---
388
+
389
+ ### underpost cluster
365
390
 
366
391
  Manages Kubernetes clusters, defaulting to Kind cluster initialization.
367
392
 
@@ -413,7 +438,9 @@ Manages Kubernetes clusters, defaulting to Kind cluster initialization.
413
438
  | `--replicas <replicas>` | Sets a custom number of replicas for statefulset deployments. |
414
439
  | `-h, --help` | display help for command |
415
440
 
416
- ### `underpost deploy`
441
+ ---
442
+
443
+ ### underpost deploy
417
444
 
418
445
  Manages application deployments, defaulting to deploying development pods.
419
446
 
@@ -436,6 +463,7 @@ Manages application deployments, defaulting to deploying development pods.
436
463
  | `--expose` | Exposes services matching the provided deployment ID list. |
437
464
  | `--cert` | Resets TLS/SSL certificate secrets for deployments. |
438
465
  | `--cert-hosts <hosts>` | Resets TLS/SSL certificate secrets for specified hosts. |
466
+ | `--self-signed` | Use a pre-created self-signed TLS secret (kubernetes.io/tls) instead of cert-manager. The secret must already exist in the namespace with the same name as the host. Enables TLS in the Contour HTTPProxy virtualhost without requiring a production ClusterIssuer. |
439
467
  | `--node <node>` | Sets optional node for deployment operations. |
440
468
  | `--build-manifest` | Builds Kubernetes YAML manifests, including deployments, services, proxies, and secrets. |
441
469
  | `--replicas <replicas>` | Sets a custom number of replicas for deployments. |
@@ -447,6 +475,8 @@ Manages application deployments, defaulting to deploying development pods.
447
475
  | `--retry-count <count>` | Sets HTTPProxy per-route retry count (e.g., 3). |
448
476
  | `--retry-per-try-timeout <duration>` | Sets HTTPProxy retry per-try timeout (e.g., "150ms"). |
449
477
  | `--disable-update-deployment` | Disables updates to deployments. |
478
+ | `--disable-runtime-probes` | Omits the internal-status HTTP probes from generated deployment manifests. |
479
+ | `--tcp-probes` | Generates legacy TCP socket probes instead of HTTP internal-status probes (migration). |
450
480
  | `--disable-update-proxy` | Disables updates to proxies. |
451
481
  | `--disable-deployment-proxy` | Disables proxies of deployments. |
452
482
  | `--disable-update-volume` | Disables updates to volume mounts during deployment. |
@@ -460,13 +490,18 @@ Manages application deployments, defaulting to deploying development pods.
460
490
  | `--kind-type <kind-type>` | Specifies the Kind cluster type for deployment operations. |
461
491
  | `--port <port>` | Sets up port forwarding from local to remote ports. |
462
492
  | `--expose-port <port>` | Sets the local:remote port to expose when --expose is active (overrides auto-detected service port). |
493
+ | `--expose-local-port <port>` | Sets a different local port for --expose (e.g. 80) while keeping the remote service port. Useful for /etc/hosts local access without specifying a port in the browser. |
494
+ | `--local-proxy` | Forward all service TCP ports locally and start the Node.js path-routing proxy. Enables full path-based routing (e.g. /wp alongside /) without needing --expose-local-port. Requires --expose. |
463
495
  | `--cmd <cmd>` | Custom initialization command for deployment (comma-separated commands). |
464
496
  | `--skip-full-build` | Skip client bundle rebuild; container will pull pre-built bundle via pull-bundle instead. |
465
497
  | `--pull-bundle` | Explicitly pull the pre-built client bundle from Cloudinary inside the container. Use together with --skip-full-build. |
466
498
  | `--image-pull-policy <policy>` | Override container imagePullPolicy in the generated deployment manifest (Always, IfNotPresent, Never). Defaults to Never for localhost/ images and IfNotPresent otherwise. |
499
+ | `--tls` | Enables TLS for the local proxy started by --expose --local-proxy. The proxy will serve HTTPS on port 443 using self-signed certificates resolved from the local SSL store. Use together with --expose and --local-proxy. |
467
500
  | `-h, --help` | display help for command |
468
501
 
469
- ### `underpost secret`
502
+ ---
503
+
504
+ ### underpost secret
470
505
 
471
506
  Manages secrets for various platforms.
472
507
 
@@ -489,7 +524,9 @@ Manages secrets for various platforms.
489
524
  | `--list` | Lists all available secrets for the platform. |
490
525
  | `-h, --help` | display help for command |
491
526
 
492
- ### `underpost image`
527
+ ---
528
+
529
+ ### underpost image
493
530
 
494
531
  Manages Docker images, including building, saving, and loading into Kubernetes clusters.
495
532
 
@@ -519,7 +556,9 @@ Manages Docker images, including building, saving, and loading into Kubernetes c
519
556
  | `--pull-dockerhub <dockerhub-image>` | Sets a custom Docker Hub image for base image pulls. |
520
557
  | `-h, --help` | display help for command |
521
558
 
522
- ### `underpost install`
559
+ ---
560
+
561
+ ### underpost install
523
562
 
524
563
  Quickly imports Underpost npm dependencies by copying them.
525
564
 
@@ -531,7 +570,9 @@ Quickly imports Underpost npm dependencies by copying them.
531
570
  | --- | --- |
532
571
  | `-h, --help` | display help for command |
533
572
 
534
- ### `underpost db`
573
+ ---
574
+
575
+ ### underpost db
535
576
 
536
577
  Manages database operations with support for MariaDB and MongoDB, including import/export, multi-pod targeting, and Git integration.
537
578
 
@@ -573,7 +614,9 @@ Manages database operations with support for MariaDB and MongoDB, including impo
573
614
  | `--repo-backup` | Backs up repositories (git commit+push) inside deployment pods via kubectl exec. |
574
615
  | `-h, --help` | display help for command |
575
616
 
576
- ### `underpost metadata`
617
+ ---
618
+
619
+ ### underpost metadata
577
620
 
578
621
  Manages cluster metadata operations, including import and export.
579
622
 
@@ -600,7 +643,9 @@ Manages cluster metadata operations, including import and export.
600
643
  | `--dev` | Sets the development cli context |
601
644
  | `-h, --help` | display help for command |
602
645
 
603
- ### `underpost cron`
646
+ ---
647
+
648
+ ### underpost cron
604
649
 
605
650
  Manages cron jobs: execute jobs directly or generate and apply K8s CronJob manifests.
606
651
 
@@ -632,7 +677,9 @@ Manages cron jobs: execute jobs directly or generate and apply K8s CronJob manif
632
677
  | `--create-job-now` | After applying manifests, immediately create a Job from each CronJob (requires --apply). |
633
678
  | `-h, --help` | display help for command |
634
679
 
635
- ### `underpost fs`
680
+ ---
681
+
682
+ ### underpost fs
636
683
 
637
684
  Manages file storage, defaulting to file upload operations.
638
685
 
@@ -658,7 +705,9 @@ Manages file storage, defaulting to file upload operations.
658
705
  | `--storage-file-path <storage-file-path>` | Specifies a custom file storage path. |
659
706
  | `-h, --help` | display help for command |
660
707
 
661
- ### `underpost test`
708
+ ---
709
+
710
+ ### underpost test
662
711
 
663
712
  Manages and runs tests, defaulting to the current Underpost default test suite.
664
713
 
@@ -682,7 +731,9 @@ Manages and runs tests, defaulting to the current Underpost default test suite.
682
731
  | `--kind-type <kind-type>` | Optional: Specifies the Kind cluster type for tests. |
683
732
  | `-h, --help` | display help for command |
684
733
 
685
- ### `underpost monitor`
734
+ ---
735
+
736
+ ### underpost monitor
686
737
 
687
738
  Manages health server monitoring for specified deployments.
688
739
 
@@ -716,7 +767,9 @@ Manages health server monitoring for specified deployments.
716
767
  | `--promote` | Promotes the deployment after monitoring. |
717
768
  | `-h, --help` | display help for command |
718
769
 
719
- ### `underpost ssh`
770
+ ---
771
+
772
+ ### underpost ssh
720
773
 
721
774
  Manages SSH credentials and sessions for remote access to cluster nodes or services.
722
775
 
@@ -749,7 +802,9 @@ Manages SSH credentials and sessions for remote access to cluster nodes or servi
749
802
  | `--copy` | Copies the connection URI to clipboard. |
750
803
  | `-h, --help` | display help for command |
751
804
 
752
- ### `underpost run`
805
+ ---
806
+
807
+ ### underpost run
753
808
 
754
809
  Runs specified scripts using various runners.
755
810
 
@@ -759,7 +814,7 @@ Runs specified scripts using various runners.
759
814
 
760
815
  | Argument | Description |
761
816
  | --- | --- |
762
- | `runner-id` | The runner ID to run. Options: dev-cluster,ipfs-expose,metadata,svc-ls,svc-rm,ssh-deploy-info,dev-hosts-expose,dev-hosts-restore,cluster-build,template-deploy,template-deploy-local,docker-image,clean,pull,release-deploy,ssh-deploy,ide,crypto-policy,sync,stop,ssh-deploy-stop,ssh-deploy-db-rollback,ssh-deploy-db,ssh-deploy-db-status,tz,get-proxy,instance-promote,instance,instance-build-manifest,ls-deployments,host-update,install-crio,dd-container,ip-info,db-client,git-conf,promote,metrics,cluster,deploy,disk-clean,disk-devices,disk-usage,dev,service,etc-hosts,sh,log,ps,pid-info,background,ports,deploy-test,tf-vae-test,spark-template,pull-rocky-image,rmi,kill,generate-pass,secret,underpost-config,gpu-env,tf-gpu-test,deploy-job,push-bundle,pull-bundle,monitor-ui,shared-dir. |
817
+ | `runner-id` | The runner ID to run. Options: dev-cluster,etc-hosts,ipfs-expose,metadata,svc-ls,svc-rm,ssh-deploy-info,dev-hosts-expose,dev-hosts-restore,cluster-build,template-deploy,template-deploy-local,docker-image,clean,pull,release-deploy,ssh-deploy,ide,crypto-policy,sync,stop,ssh-deploy-stop,ssh-deploy-db-rollback,ssh-deploy-db,ssh-deploy-db-status,tz,get-proxy,instance-promote,instance,instance-build-manifest,ls-deployments,host-update,install-crio,dd-container,ip-info,db-client,git-conf,promote,metrics,cluster,deploy,disk-clean,disk-devices,disk-usage,dev,service,sh,log,ps,pid-info,background,ports,deploy-test,tf-vae-test,spark-template,pull-rocky-image,rmi,kill,generate-pass,secret,underpost-config,gpu-env,tf-gpu-test,deploy-job,push-bundle,pull-bundle,build-cluster-deployment-manifests,monitor-ui,shared-dir. |
763
818
  | `path` | The input value, identifier, or path for the operation. |
764
819
 
765
820
  #### Options
@@ -835,7 +890,9 @@ Runs specified scripts using various runners.
835
890
  | `--remove` | Remove/teardown resources |
836
891
  | `-h, --help` | display help for command |
837
892
 
838
- ### `underpost lxd`
893
+ ---
894
+
895
+ ### underpost lxd
839
896
 
840
897
  Manages LXD virtual machines as K3s nodes (control plane or workers).
841
898
 
@@ -880,7 +937,9 @@ Manages LXD virtual machines as K3s nodes (control plane or workers).
880
937
  | `--move-to-project` | Stop the [vm-id] VM in the default project, move it to --maas-project, then start it so MAAS picks it up. Requires --maas-project. |
881
938
  | `-h, --help` | display help for command |
882
939
 
883
- ### `underpost baremetal`
940
+ ---
941
+
942
+ ### underpost baremetal
884
943
 
885
944
  Manages baremetal server operations, including installation, database setup, commissioning, and user management.
886
945
 
@@ -938,7 +997,9 @@ Manages baremetal server operations, including installation, database setup, com
938
997
  | `--ls` | Lists available boot resources and machines. |
939
998
  | `-h, --help` | display help for command |
940
999
 
941
- ### `underpost release`
1000
+ ---
1001
+
1002
+ ### underpost release
942
1003
 
943
1004
  Release orchestrator for building new versions and deploying releases of the Underpost CLI.
944
1005
 
@@ -960,4 +1021,10 @@ Release orchestrator for building new versions and deploying releases of the Und
960
1021
  | `--message <message>` | Commit message for --ci-push or --pwa-build (defaults to last commit of the engine repository). |
961
1022
  | `--pwa-build` | Runs the pwa-microservices-template update flow: always re-clones, syncs engine sources, installs, builds, and pushes. |
962
1023
  | `--dry-run` | For --build: previews version-bump changes (per-file substitution counts) without writing files or running downstream commands. |
1024
+ | `--mongo-host <host>` | For --build: override DB_HOST in the template .env.example for the smoke test (e.g., "192.168.1.82:27017"). |
1025
+ | `--mongo-user <user>` | For --build: override DB_USER in the template .env.example for the smoke test. |
1026
+ | `--mongo-password <password>` | For --build: override DB_PASSWORD in the template .env.example for the smoke test. |
1027
+ | `--valkey-host <host>` | For --build: override VALKEY_HOST in the template .env.example for the smoke test (e.g., "192.168.1.82"). |
963
1028
  | `-h, --help` | display help for command |
1029
+
1030
+ ---
package/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  <div align="center">
18
18
 
19
- [![Node.js CI](https://github.com/underpostnet/engine/actions/workflows/docker-image.ci.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/docker-image.ci.yml) [![Test](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml) [![Downloads](https://img.shields.io/npm/dm/underpost.svg)](https://www.npmjs.com/package/underpost) [![](https://data.jsdelivr.com/v1/package/npm/underpost/badge)](https://www.jsdelivr.com/package/npm/underpost) [![Socket Badge](https://socket.dev/api/badge/npm/package/underpost/3.2.14)](https://socket.dev/npm/package/underpost/overview/3.2.14) [![Coverage Status](https://coveralls.io/repos/github/underpostnet/engine/badge.svg?branch=master)](https://coveralls.io/github/underpostnet/engine?branch=master) [![Version](https://img.shields.io/npm/v/underpost.svg)](https://www.npmjs.org/package/underpost) [![License](https://img.shields.io/npm/l/underpost.svg)](https://www.npmjs.com/package/underpost)
19
+ [![Node.js CI](https://github.com/underpostnet/engine/actions/workflows/docker-image.ci.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/docker-image.ci.yml) [![Test](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml) [![Downloads](https://img.shields.io/npm/dm/underpost.svg)](https://www.npmjs.com/package/underpost) [![](https://data.jsdelivr.com/v1/package/npm/underpost/badge)](https://www.jsdelivr.com/package/npm/underpost) [![Socket Badge](https://socket.dev/api/badge/npm/package/underpost/3.2.21)](https://socket.dev/npm/package/underpost/overview/3.2.21) [![Coverage Status](https://coveralls.io/repos/github/underpostnet/engine/badge.svg?branch=master)](https://coveralls.io/github/underpostnet/engine?branch=master) [![Version](https://img.shields.io/npm/v/underpost.svg)](https://www.npmjs.org/package/underpost) [![License](https://img.shields.io/npm/l/underpost.svg)](https://www.npmjs.com/package/underpost)
20
20
 
21
21
  </div>
22
22
 
@@ -88,7 +88,7 @@ npm run dev
88
88
  <!-- cli-index-start -->
89
89
  ## Underpost CLI
90
90
 
91
- > underpost ci/cd cli v3.2.14
91
+ > underpost ci/cd cli v3.2.21
92
92
 
93
93
  **Usage:** `underpost [options] [command]`
94
94
 
@@ -4,7 +4,7 @@ import { Command } from 'commander';
4
4
  import fs from 'fs-extra';
5
5
  import dotenv from 'dotenv';
6
6
  import { loggerFactory } from '../src/server/logger.js';
7
- import { buildTemplate } from '../src/server/conf.js';
7
+ import { buildTemplate, updatePrivateTemplateRepo } from '../src/server/conf.js';
8
8
 
9
9
  if (fs.existsSync('./engine-private/conf/dd-cron/.env.production'))
10
10
  dotenv.config({ path: `./engine-private/conf/dd-cron/.env.production`, override: true });
@@ -19,8 +19,10 @@ program
19
19
  .description('Rebuild the standalone pwa-microservices-template from scratch out of the engine source tree.')
20
20
  .argument('[src-path]', 'Engine source root to sync from.', './')
21
21
  .argument('[to-path]', 'Template output path.', '../pwa-microservices-template')
22
- .action(async (srcPath, toPath) => {
22
+ .option('--update-private', 'Update private template repository', false)
23
+ .action(async (srcPath, toPath, options) => {
23
24
  try {
25
+ if (options.updatePrivate) return await updatePrivateTemplateRepo();
24
26
  await buildTemplate({ srcPath: srcPath.replaceAll(`'`, ''), toPath: toPath.replaceAll(`'`, '') });
25
27
  } catch (error) {
26
28
  logger.error(error, error.stack);
@@ -23,7 +23,7 @@ spec:
23
23
  spec:
24
24
  containers:
25
25
  - name: dd-cron-backup
26
- image: underpost/underpost-engine:v3.2.14
26
+ image: underpost/underpost-engine:v3.2.21
27
27
  command:
28
28
  - /bin/sh
29
29
  - -c
@@ -23,7 +23,7 @@ spec:
23
23
  spec:
24
24
  containers:
25
25
  - name: dd-cron-dns
26
- image: underpost/underpost-engine:v3.2.14
26
+ image: underpost/underpost-engine:v3.2.21
27
27
  command:
28
28
  - /bin/sh
29
29
  - -c
@@ -17,7 +17,7 @@ spec:
17
17
  spec:
18
18
  containers:
19
19
  - name: dd-default-development-blue
20
- image: underpost/underpost-engine:v3.2.14
20
+ image: underpost/underpost-engine:v3.2.21
21
21
  # resources:
22
22
  # requests:
23
23
  # memory: "124Ki"
@@ -98,7 +98,7 @@ spec:
98
98
  spec:
99
99
  containers:
100
100
  - name: dd-default-development-green
101
- image: underpost/underpost-engine:v3.2.14
101
+ image: underpost/underpost-engine:v3.2.21
102
102
  # resources:
103
103
  # requests:
104
104
  # memory: "124Ki"
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "main": "src/index.js",
4
4
  "name": "underpost",
5
- "version": "3.2.14",
5
+ "version": "3.2.21",
6
6
  "description": "Underpost Platform — end-to-end CI/CD and application-delivery toolchain CLI. Covers bare metal, Kubernetes, K3s, kubeadm, LXD, container/image orchestration, secrets, databases, cron jobs, monitoring, SSH, runners, PWA + Workbox delivery, and release orchestration. Extensible via downstream CLIs.",
7
7
  "scripts": {
8
8
  "start": "node --max-old-space-size=8192 src/server",
@@ -0,0 +1,6 @@
1
+
2
+ #!/usr/bin/env bash
3
+ set -euo pipefail
4
+
5
+ cd /home/dd && underpost clone underpostnet/pwa-microservices-template
6
+ cd /home/dd/pwa-microservices-template && npm install && npm link
@@ -0,0 +1,86 @@
1
+
2
+ #!/usr/bin/env bash
3
+ set -euo pipefail
4
+
5
+ ENV=development
6
+ DEPLOY_ID=dd-test
7
+ IMAGE=underpost/wp:v3.2.14
8
+ USE_CERT=false # Set to true to use --cert, false to use --disable-update-proxy
9
+ USE_PULL_BUNDLE=false # Set to true to include --pull-bundle in start command, false to omit it
10
+ USE_TLS=false # Set to true to generate self-signed certs and expose via HTTPS
11
+ VERSIONS=green
12
+
13
+ # Parse --tls flag from script arguments
14
+ for arg in "$@"; do
15
+ case $arg in
16
+ --tls) USE_TLS=true ;;
17
+ esac
18
+ done
19
+
20
+ # Optional to concat in link cmd:
21
+ # underpost secret underpost --create-from-env
22
+
23
+ LINK_CMD="cd /home/dd,underpost clone underpostnet/pwa-microservices-template-private,cd /home/dd/pwa-microservices-template-private,npm install,npm link"
24
+ PROXY_FLAG=""
25
+ CLUSTER_FLAG=""
26
+ EXPOSE_FLAGS=""
27
+
28
+ node bin run build-cluster-deployment-manifests
29
+ node bin/build.template --update-private
30
+
31
+ if [ "$USE_PULL_BUNDLE" = true ]; then
32
+ DEPLOY_CMD="$LINK_CMD,underpost start --build --run --pull-bundle $DEPLOY_ID $ENV"
33
+ else
34
+ DEPLOY_CMD="$LINK_CMD,underpost start --build --run $DEPLOY_ID $ENV"
35
+ fi
36
+
37
+ if [ "$USE_CERT" = true ]; then
38
+ PROXY_FLAG="--cert"
39
+ fi
40
+
41
+ if [ "$USE_TLS" = true ]; then
42
+ PROXY_FLAG="--self-signed"
43
+ fi
44
+
45
+ node bin deploy $DEPLOY_ID $ENV $CLUSTER_FLAG --sync --build-manifest --image $IMAGE --timeout-response 300000ms --versions $VERSIONS --replicas 1 --cmd "$DEPLOY_CMD"
46
+ node bin deploy $DEPLOY_ID $ENV $CLUSTER_FLAG --disable-update-proxy $PROXY_FLAG
47
+ node bin monitor $DEPLOY_ID $ENV --ready-deployment --promote --timeout-response 300000ms --versions $VERSIONS --replicas 1
48
+
49
+ node bin run etc-hosts --deploy-id $DEPLOY_ID
50
+
51
+ # Generate self-signed TLS certs and create k8s TLS secrets for all hosts
52
+ if [ "$USE_TLS" = true ]; then
53
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
54
+ ENGINE_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
55
+ SSL_BASE="${ENGINE_DIR}/engine-private/ssl"
56
+ NAMESPACE=default
57
+
58
+ # Extract hosts from conf.server.json
59
+ HOSTS=$(node -e "
60
+ const conf = require('./engine-private/conf/${DEPLOY_ID}/conf.server.json');
61
+ console.log(Object.keys(conf).join(' '));
62
+ ")
63
+
64
+ for HOST in $HOSTS; do
65
+ CERT_DIR="${SSL_BASE}/${HOST}"
66
+ mkdir -p "$CERT_DIR"
67
+
68
+ # Regenerate self-signed cert (idempotent — overwrites existing files)
69
+ bash "${SCRIPT_DIR}/ssl.sh" "$CERT_DIR" "$HOST"
70
+
71
+ NAME_SAFE="${HOST//[^a-zA-Z0-9_.-]/_}"
72
+ CERT_FILE="${CERT_DIR}/${NAME_SAFE}.pem"
73
+ KEY_FILE="${CERT_DIR}/${NAME_SAFE}-key.pem"
74
+
75
+ # Create / replace k8s TLS secret (name matches host, as referenced by HTTPProxy)
76
+ kubectl delete secret "$HOST" -n "$NAMESPACE" --ignore-not-found
77
+ kubectl create secret tls "$HOST" \
78
+ --cert="$CERT_FILE" \
79
+ --key="$KEY_FILE" \
80
+ -n "$NAMESPACE"
81
+ done
82
+
83
+ EXPOSE_FLAGS="--tls"
84
+ fi
85
+
86
+ node bin deploy --expose --local-proxy $DEPLOY_ID $ENV $EXPOSE_FLAGS