underpost 3.2.0 → 3.2.2
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/.github/workflows/publish.ci.yml +6 -0
- package/.github/workflows/pwa-microservices-template-page.cd.yml +1 -1
- package/.github/workflows/release.cd.yml +10 -5
- package/CHANGELOG.md +73 -1
- package/CLI-HELP.md +5 -4
- package/Dockerfile +4 -2
- package/README.md +2 -2
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +5 -2
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +5 -2
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +18 -26
- package/package.json +2 -2
- package/src/cli/db.js +687 -620
- package/src/cli/deploy.js +47 -28
- package/src/cli/env.js +18 -0
- package/src/cli/fs.js +3 -1
- package/src/cli/index.js +3 -1
- package/src/cli/repository.js +143 -0
- package/src/cli/run.js +1 -1
- package/src/cli/secrets.js +73 -0
- package/src/client/components/core/DropDown.js +13 -5
- package/src/index.js +1 -1
- package/src/runtime/express/Dockerfile +4 -0
- package/src/runtime/lampp/Dockerfile +4 -0
- package/src/runtime/lampp/Lampp.js +23 -1
- package/src/runtime/wp/Dockerfile +4 -0
- package/src/runtime/wp/Wp.js +148 -6
- package/src/server/backup.js +57 -41
- package/src/server/cron.js +23 -18
- package/src/server/start.js +2 -7
|
@@ -66,3 +66,9 @@ jobs:
|
|
|
66
66
|
npm publish
|
|
67
67
|
env:
|
|
68
68
|
NODE_AUTH_TOKEN: ${{ secrets.GIT_AUTH_TOKEN }}
|
|
69
|
+
|
|
70
|
+
# Release deploy — triggers release.cd.yml after Docker build succeeds
|
|
71
|
+
deploy-release:
|
|
72
|
+
needs: build-and-publish
|
|
73
|
+
uses: ./.github/workflows/release.cd.yml
|
|
74
|
+
secrets: inherit
|
|
@@ -63,7 +63,7 @@ jobs:
|
|
|
63
63
|
- name: Setup Pages
|
|
64
64
|
uses: actions/configure-pages@v6
|
|
65
65
|
- name: Upload artifact
|
|
66
|
-
uses: actions/upload-pages-artifact@
|
|
66
|
+
uses: actions/upload-pages-artifact@v5
|
|
67
67
|
with:
|
|
68
68
|
# Upload entire repository
|
|
69
69
|
path: './public/underpostnet.github.io/pwa-microservices-template-ghpkg/'
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
name: CD | Release deployment | remote ssh
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
|
|
7
|
+
workflow_call:
|
|
8
|
+
|
|
9
|
+
workflow_dispatch:
|
|
8
10
|
|
|
9
11
|
jobs:
|
|
10
12
|
after-publish:
|
|
11
|
-
if:
|
|
13
|
+
if: |
|
|
14
|
+
github.event_name == 'workflow_dispatch'
|
|
15
|
+
|| github.event_name == 'workflow_call'
|
|
16
|
+
|| (github.event_name == 'push' && startsWith(github.event.head_commit.message, 'cd(ssh-release)'))
|
|
12
17
|
runs-on: ubuntu-latest
|
|
13
18
|
steps:
|
|
14
19
|
- name: Run remote deploy via SSH
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,78 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 2026-04-
|
|
3
|
+
## 2026-04-15
|
|
4
|
+
|
|
5
|
+
### docker-image
|
|
6
|
+
|
|
7
|
+
- Remove unnecessary directory creation and volume declaration for working directory in Dockerfile ([84f7f8950](https://github.com/underpostnet/engine/commit/84f7f8950d45512b6177c7523e4d278f2db25ef4))
|
|
8
|
+
|
|
9
|
+
### github-actions
|
|
10
|
+
|
|
11
|
+
- Update CronJob schedules and commands to include kubeadm flag ([2795d6a8a](https://github.com/underpostnet/engine/commit/2795d6a8a9cd552afbd22b16616c982227540dff))
|
|
12
|
+
- Add volume mounts for .env file in dd-cron backup and dns CronJobs ([76cd8a31b](https://github.com/underpostnet/engine/commit/76cd8a31b7d3686d87333bb5384c6648bfbaf066))
|
|
13
|
+
- Refactor deployment and cron job scripts for improved readability and maintainability ([34d38d077](https://github.com/underpostnet/engine/commit/34d38d077adde37d9665b699e642b2ce62bce7fc))
|
|
14
|
+
- Refactor deployment scripts to use environment variables for secret creation ([40165237c](https://github.com/underpostnet/engine/commit/40165237caa07386c71ae2db81894e0e7b1d6373))
|
|
15
|
+
- Update cron jobs and deployment scripts to use secrets and streamline environment variable handling ([3e3b0c3b0](https://github.com/underpostnet/engine/commit/3e3b0c3b013b012c37c076a71915c365047b989f))
|
|
16
|
+
|
|
17
|
+
### cli-cron
|
|
18
|
+
|
|
19
|
+
- Add support for k3s, kind, and kubeadm flags in CronJob configuration ([d7edd8dea](https://github.com/underpostnet/engine/commit/d7edd8dea0c978151f80130203686379beebac2c))
|
|
20
|
+
- Add environment variable volume and path for Kubernetes CronJob ([abe731634](https://github.com/underpostnet/engine/commit/abe7316348a90f4fbe8730150bd87a9ee56d8d5c))
|
|
21
|
+
- Refactor deployment scripts to create secrets from container environment variables and streamline environment handling ([e5589ec7f](https://github.com/underpostnet/engine/commit/e5589ec7f6ff67c4d99d49cf65e3261c190919c1))
|
|
22
|
+
- Enhance deployment and backup processes ([f58323077](https://github.com/underpostnet/engine/commit/f58323077dfb4449f22dc4719d07addf2e18d820))
|
|
23
|
+
|
|
24
|
+
### cli-db
|
|
25
|
+
|
|
26
|
+
- Add error handling and logging for database operations in UnderpostDB ([c0d935a0c](https://github.com/underpostnet/engine/commit/c0d935a0ce08d26490c997b284e72e3c7f728b76))
|
|
27
|
+
- Implement private engine repository management ([84719664a](https://github.com/underpostnet/engine/commit/84719664adac949b42a0731e408bbb467ed867bd))
|
|
28
|
+
|
|
29
|
+
### package
|
|
30
|
+
|
|
31
|
+
- Implement feature X to enhance user experience and fix bug Y in module Z ([8dea4a2f7](https://github.com/underpostnet/engine/commit/8dea4a2f7e53cb5f026bd52aa9adad7909cb01c1))
|
|
32
|
+
- Remove --force option from install:test script to prevent unintended package installations ([2aeeff179](https://github.com/underpostnet/engine/commit/2aeeff179a5bd508b38fd73bb1877d80c1caecb4))
|
|
33
|
+
- Remove force in coveralls-next install script ([5751a6d12](https://github.com/underpostnet/engine/commit/5751a6d126f043b43d90269fa79d0dc1164a5be1))
|
|
34
|
+
|
|
35
|
+
### runtime-wp
|
|
36
|
+
|
|
37
|
+
- Implement automatic commit and push of generated files to repository during provisioning ([d20f079ec](https://github.com/underpostnet/engine/commit/d20f079ec472c81960cccf5dcdbdefb3c8eb91e4))
|
|
38
|
+
|
|
39
|
+
### runtime-lampp
|
|
40
|
+
|
|
41
|
+
- Enhance .htaccess rules for WordPress and Lampp to protect sensitive files and directories ([1a455ec7b](https://github.com/underpostnet/engine/commit/1a455ec7bd5490603cf7d621d6703d8966a3ee2c))
|
|
42
|
+
|
|
43
|
+
### cli-deploy
|
|
44
|
+
|
|
45
|
+
- Refactor command construction in deployment and cron scripts for improved readability ([ceaf5012b](https://github.com/underpostnet/engine/commit/ceaf5012b2b16a52f16e816c178d8d4f5af1590d))
|
|
46
|
+
|
|
47
|
+
### gitub-actions
|
|
48
|
+
|
|
49
|
+
- Refactor CI workflows to streamline Docker build and release processes ([ab0875839](https://github.com/underpostnet/engine/commit/ab0875839ab1d174db8d8cff8daf3734282fce00))
|
|
50
|
+
- Refactor CI/CD workflows to streamline Docker build and release processes ([5330af102](https://github.com/underpostnet/engine/commit/5330af10280e7acf2a52b3e0ac17bc5dcd5050b4))
|
|
51
|
+
|
|
52
|
+
### client-core
|
|
53
|
+
|
|
54
|
+
- Add SocketIoHandler and AppStore to DefaultConf component list ([a55096889](https://github.com/underpostnet/engine/commit/a550968898ec9526ed3dceef48839ce6be3f1571))
|
|
55
|
+
- Refactor API path handling to introduce getApiBaseProxyPath function and streamline base path construction ([afb1b3532](https://github.com/underpostnet/engine/commit/afb1b35325187ef110b40f4a11f78bfd7e7dbb87))
|
|
56
|
+
- Enhance DropDown component to reset checkbox values and improve state management on click events ([b02a3fad4](https://github.com/underpostnet/engine/commit/b02a3fad4b9587b317f85c5763f34f806642a7ee))
|
|
57
|
+
- Refactor API path handling to introduce getApiBaseProxyPath function and simplify getApiBasePath logic ([0a18bce99](https://github.com/underpostnet/engine/commit/0a18bce996835a8152360a5f7b2f1b2afaea3423))
|
|
58
|
+
|
|
59
|
+
### cli-fs
|
|
60
|
+
|
|
61
|
+
- Enhance pull operation to log skipped files when they already exist ([7330aa012](https://github.com/underpostnet/engine/commit/7330aa0126dd67bedf75b847dc6c0794f2ecbf74))
|
|
62
|
+
|
|
63
|
+
### cli-env
|
|
64
|
+
|
|
65
|
+
- Refactor UnderpostSecret to streamline environment file handling and remove existing global .env file ([c510f7cff](https://github.com/underpostnet/engine/commit/c510f7cff1aeb3ae26e037000efcee53bcfe6b4b))
|
|
66
|
+
|
|
67
|
+
### server-start
|
|
68
|
+
|
|
69
|
+
- Add cleanup command to production deployment process ([5bf5530e3](https://github.com/underpostnet/engine/commit/5bf5530e34b97a6fc1a240a10604d4f5abe2f8cb))
|
|
70
|
+
|
|
71
|
+
### conf
|
|
72
|
+
|
|
73
|
+
- Add SocketIoHandler and AppStore to default configuration ([d155277a3](https://github.com/underpostnet/engine/commit/d155277a38359d32d5cd78be20453990585d5d00))
|
|
74
|
+
|
|
75
|
+
## New release v:3.2.0 (2026-04-13)
|
|
4
76
|
|
|
5
77
|
### cli-repository
|
|
6
78
|
|
package/CLI-HELP.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## underpost ci/cd cli v3.2.
|
|
1
|
+
## underpost ci/cd cli v3.2.2
|
|
2
2
|
|
|
3
3
|
### Usage: `underpost [options] [command]`
|
|
4
4
|
```
|
|
@@ -553,13 +553,15 @@ Manages secrets for various platforms.
|
|
|
553
553
|
|
|
554
554
|
Arguments:
|
|
555
555
|
platform The secret management platform. Options:
|
|
556
|
-
underpost.
|
|
556
|
+
underpost, globalSecretClean.
|
|
557
557
|
|
|
558
558
|
Options:
|
|
559
559
|
--init Initializes the secrets platform
|
|
560
560
|
environment.
|
|
561
561
|
--create-from-file <path-env-file> Creates secrets from a specified
|
|
562
562
|
environment file.
|
|
563
|
+
--create-from-env Creates secrets from container environment
|
|
564
|
+
variables (envFrom: secretRef).
|
|
563
565
|
--list Lists all available secrets for the
|
|
564
566
|
platform.
|
|
565
567
|
-h, --help display help for command
|
|
@@ -659,6 +661,7 @@ Options:
|
|
|
659
661
|
--kubeadm Enables the kubeadm context for database operations.
|
|
660
662
|
--kind Enables the kind context for database operations.
|
|
661
663
|
--k3s Enables the k3s context for database operations.
|
|
664
|
+
--repo-backup Backs up repositories (git commit+push) inside deployment pods via kubectl exec.
|
|
662
665
|
-h, --help display help for command
|
|
663
666
|
|
|
664
667
|
```
|
|
@@ -723,8 +726,6 @@ Options:
|
|
|
723
726
|
--dry-run Preview cron jobs without executing them.
|
|
724
727
|
--create-job-now After applying manifests, immediately create a Job
|
|
725
728
|
from each CronJob (requires --apply).
|
|
726
|
-
--ssh Execute backup commands via SSH on the remote node
|
|
727
|
-
instead of locally.
|
|
728
729
|
-h, --help display help for command
|
|
729
730
|
|
|
730
731
|
```
|
package/Dockerfile
CHANGED
|
@@ -34,9 +34,11 @@ RUN npm --version
|
|
|
34
34
|
RUN npm install -g underpost
|
|
35
35
|
RUN underpost --version
|
|
36
36
|
|
|
37
|
+
# Create non-root user for secure container execution (cron jobs, init containers)
|
|
38
|
+
# Deployment containers override to root via securityContext when npm install -g is needed
|
|
39
|
+
RUN useradd -m -u 1000 -s /bin/bash dd
|
|
40
|
+
|
|
37
41
|
# Create working directory
|
|
38
|
-
RUN mkdir /home/dd
|
|
39
|
-
VOLUME /home/dd
|
|
40
42
|
WORKDIR /home/dd
|
|
41
43
|
|
|
42
44
|
# Expose necessary ports
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
<div align="center">
|
|
18
18
|
|
|
19
|
-
[](https://github.com/underpostnet/engine/actions/workflows/docker-image.ci.yml) [](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml) [](https://www.npmjs.com/package/underpost) [](https://github.com/underpostnet/engine/actions/workflows/docker-image.ci.yml) [](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml) [](https://www.npmjs.com/package/underpost) [](https://socket.dev/npm/package/underpost/overview/3.2.2) [](https://coveralls.io/github/underpostnet/engine?branch=master) [](https://www.npmjs.org/package/underpost) [](https://www.npmjs.com/package/underpost)
|
|
20
20
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
@@ -61,7 +61,7 @@ npm run dev
|
|
|
61
61
|
<a target="_top" href="https://www.nexodev.org/docs?cid=src">See Docs here.</a>
|
|
62
62
|
|
|
63
63
|
<!-- cli-index-start -->
|
|
64
|
-
## underpost ci/cd cli v3.2.
|
|
64
|
+
## underpost ci/cd cli v3.2.2
|
|
65
65
|
|
|
66
66
|
### Usage: `underpost [options] [command]`
|
|
67
67
|
```
|
|
@@ -23,12 +23,15 @@ spec:
|
|
|
23
23
|
spec:
|
|
24
24
|
containers:
|
|
25
25
|
- name: dd-cron-backup
|
|
26
|
-
image: underpost/underpost-engine:v3.2.
|
|
26
|
+
image: underpost/underpost-engine:v3.2.2
|
|
27
27
|
command:
|
|
28
28
|
- /bin/sh
|
|
29
29
|
- -c
|
|
30
30
|
- >
|
|
31
|
-
|
|
31
|
+
cd /home/dd/engine &&
|
|
32
|
+
node bin run secret &&
|
|
33
|
+
node bin env dd-cron production &&
|
|
34
|
+
node bin cron --git --dev --kubeadm dd-lampp,dd-cyberia,dd-core,dd-test backup
|
|
32
35
|
volumeMounts:
|
|
33
36
|
- mountPath: /home/dd/engine
|
|
34
37
|
name: underpost-cron-container-volume
|
|
@@ -23,12 +23,15 @@ spec:
|
|
|
23
23
|
spec:
|
|
24
24
|
containers:
|
|
25
25
|
- name: dd-cron-dns
|
|
26
|
-
image: underpost/underpost-engine:v3.2.
|
|
26
|
+
image: underpost/underpost-engine:v3.2.2
|
|
27
27
|
command:
|
|
28
28
|
- /bin/sh
|
|
29
29
|
- -c
|
|
30
30
|
- >
|
|
31
|
-
|
|
31
|
+
cd /home/dd/engine &&
|
|
32
|
+
node bin run secret &&
|
|
33
|
+
node bin env dd-cron production &&
|
|
34
|
+
node bin cron --git --dev --kubeadm dd-cron dns
|
|
32
35
|
volumeMounts:
|
|
33
36
|
- mountPath: /home/dd/engine
|
|
34
37
|
name: underpost-cron-container-volume
|
|
@@ -17,7 +17,7 @@ spec:
|
|
|
17
17
|
spec:
|
|
18
18
|
containers:
|
|
19
19
|
- name: dd-default-development-blue
|
|
20
|
-
image: localhost/rockylinux9-underpost:v3.2.
|
|
20
|
+
image: localhost/rockylinux9-underpost:v3.2.2
|
|
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:v3.2.
|
|
103
|
+
image: localhost/rockylinux9-underpost:v3.2.2
|
|
104
104
|
# resources:
|
|
105
105
|
# requests:
|
|
106
106
|
# memory: "124Ki"
|
|
@@ -20,25 +20,21 @@ spec:
|
|
|
20
20
|
spec:
|
|
21
21
|
containers:
|
|
22
22
|
- name: dd-test-development-blue
|
|
23
|
-
image: localhost/rockylinux9-underpost:v3.2.
|
|
23
|
+
image: localhost/rockylinux9-underpost:v3.2.2
|
|
24
|
+
envFrom:
|
|
25
|
+
- secretRef:
|
|
26
|
+
name: underpost-config
|
|
24
27
|
|
|
25
28
|
command:
|
|
26
29
|
- /bin/sh
|
|
27
30
|
- -c
|
|
28
31
|
- >
|
|
29
|
-
npm install -g npm@11.2.0 &&
|
|
32
|
+
npm install -g npm@11.2.0 &&
|
|
33
|
+
npm install -g underpost &&
|
|
34
|
+
underpost secret underpost --create-from-env &&
|
|
35
|
+
underpost start --build --run dd-test development
|
|
36
|
+
|
|
30
37
|
|
|
31
|
-
|
|
32
|
-
volumeMounts:
|
|
33
|
-
- name: config-volume-dd-test-development-blue
|
|
34
|
-
mountPath: /etc/config
|
|
35
|
-
|
|
36
|
-
volumes:
|
|
37
|
-
- name: config-volume-dd-test-development-blue
|
|
38
|
-
configMap:
|
|
39
|
-
name: underpost-config
|
|
40
|
-
|
|
41
|
-
|
|
42
38
|
---
|
|
43
39
|
apiVersion: v1
|
|
44
40
|
kind: Service
|
|
@@ -116,25 +112,21 @@ spec:
|
|
|
116
112
|
spec:
|
|
117
113
|
containers:
|
|
118
114
|
- name: dd-test-development-green
|
|
119
|
-
image: localhost/rockylinux9-underpost:v3.2.
|
|
115
|
+
image: localhost/rockylinux9-underpost:v3.2.2
|
|
116
|
+
envFrom:
|
|
117
|
+
- secretRef:
|
|
118
|
+
name: underpost-config
|
|
120
119
|
|
|
121
120
|
command:
|
|
122
121
|
- /bin/sh
|
|
123
122
|
- -c
|
|
124
123
|
- >
|
|
125
|
-
npm install -g npm@11.2.0 &&
|
|
124
|
+
npm install -g npm@11.2.0 &&
|
|
125
|
+
npm install -g underpost &&
|
|
126
|
+
underpost secret underpost --create-from-env &&
|
|
127
|
+
underpost start --build --run dd-test development
|
|
128
|
+
|
|
126
129
|
|
|
127
|
-
|
|
128
|
-
volumeMounts:
|
|
129
|
-
- name: config-volume-dd-test-development-green
|
|
130
|
-
mountPath: /etc/config
|
|
131
|
-
|
|
132
|
-
volumes:
|
|
133
|
-
- name: config-volume-dd-test-development-green
|
|
134
|
-
configMap:
|
|
135
|
-
name: underpost-config
|
|
136
|
-
|
|
137
|
-
|
|
138
130
|
---
|
|
139
131
|
apiVersion: v1
|
|
140
132
|
kind: Service
|
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.
|
|
5
|
+
"version": "3.2.2",
|
|
6
6
|
"description": "pwa api rest template",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"start": "node --max-old-space-size=8192 src/server",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dev:proxy": "NODE_ENV=development node src/proxy proxy",
|
|
17
17
|
"docs": "jsdoc -c jsdoc.json",
|
|
18
18
|
"install:global": "npm install -g jsdoc && npm install -g prettier",
|
|
19
|
-
"install:test": "npm install -g mocha && npm install -g c8 && npm install -g coveralls-next
|
|
19
|
+
"install:test": "npm install -g mocha && npm install -g c8 && npm install -g coveralls-next",
|
|
20
20
|
"install": "npm run install:global && npm run install:test",
|
|
21
21
|
"prettier": "prettier --write .",
|
|
22
22
|
"fix": "npm audit fix --force && npm audit",
|