underpost 2.89.45 → 2.90.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/README.md CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  <!-- badges -->
20
20
 
21
- [![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.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) [![Socket Badge](https://socket.dev/api/badge/npm/package/underpost/2.89.45)](https://socket.dev/npm/package/underpost/overview/2.89.45) [![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)
21
+ [![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.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) [![Socket Badge](https://socket.dev/api/badge/npm/package/underpost/2.90.0)](https://socket.dev/npm/package/underpost/overview/2.90.0) [![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)
22
22
 
23
23
  <!-- end-badges -->
24
24
 
@@ -66,7 +66,7 @@ Run dev client server
66
66
  npm run dev
67
67
  ```
68
68
  <!-- -->
69
- ## underpost ci/cd cli v2.89.45
69
+ ## underpost ci/cd cli v2.90.0
70
70
 
71
71
  ### Usage: `underpost [options] [command]`
72
72
  ```
package/cli.md CHANGED
@@ -1,4 +1,4 @@
1
- ## underpost ci/cd cli v2.89.45
1
+ ## underpost ci/cd cli v2.90.0
2
2
 
3
3
  ### Usage: `underpost [options] [command]`
4
4
  ```
@@ -293,10 +293,6 @@ Options:
293
293
  cluster configuration.
294
294
  --list-pods Displays detailed information about all
295
295
  pods.
296
- --info-capacity Displays the current total machine
297
- capacity information.
298
- --info-capacity-pod Displays the current machine capacity
299
- information per pod.
300
296
  --pull-image Sets an optional associated image to
301
297
  pull during initialization.
302
298
  --init-host Installs necessary Kubernetes node CLI
@@ -668,45 +664,52 @@ Options:
668
664
  Runs a script from the specified path.
669
665
 
670
666
  Arguments:
671
- runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, underpost-config, gpu-env, tf-gpu-test, dev-cluster, metadata, svc-ls, svc-rm, ssh-cluster-info, dev-hosts-expose, dev-hosts-restore, cluster-build, template-deploy, template-deploy-image, clean, pull, release-deploy, ssh-deploy, ide, sync, tz, cron, ls-deployments, ls-images, host-update, dd-container, ip-info, monitor, db-client, git-conf, promote, metrics, cluster, deploy, dev, service, sh, log, release-cmt, sync-replica, tf-vae-test, deploy-job.
672
- path The absolute or relative directory path where the script is located.
667
+ runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, underpost-config, gpu-env, tf-gpu-test, dev-cluster, metadata, svc-ls, svc-rm, ssh-cluster-info, dev-hosts-expose, dev-hosts-restore, cluster-build, template-deploy, template-deploy-image, clean, pull, release-deploy, ssh-deploy, ide, sync, tz, cron, get-proxy, instance-promote, instance, ls-deployments, ls-images, host-update, dd-container, ip-info, monitor, db-client, git-conf, promote, metrics, cluster, deploy, dev, service, sh, log, release-cmt, sync-replica, tf-vae-test, deploy-job.
668
+ path The absolute or relative directory path where the script is located.
673
669
 
674
670
  Options:
675
- --command <command-array> Array of commands to run.
676
- --args <args-array> Array of arguments to pass to the command.
677
- --dev Sets the development context environment for the script.
678
- --build Set builder context runner
679
- --replicas <replicas> Sets a custom number of replicas for deployment.
680
- --pod-name <pod-name> Optional: Specifies the pod name for execution.
681
- --node-name <node-name> Optional: Specifies the node name for execution.
682
- --port <port> Optional: Specifies the port for execution.
683
- --etc-hosts Enables etc-hosts context for the runner execution.
684
- --volume-host-path <volume-host-path> Optional: Specifies the volume host path for test execution.
685
- --volume-mount-path <volume-mount-path> Optional: Specifies the volume mount path for test execution.
686
- --volume-type <volume-type> Optional: Specifies the volume type for test execution.
687
- --image-name <image-name> Optional: Specifies the image name for test execution.
688
- --container-name <container-name> Optional: Specifies the container name for test execution.
689
- --namespace <namespace> Optional: Specifies the namespace for test execution.
690
- --tty Enables TTY for the container in deploy-job.
691
- --stdin Keeps STDIN open for the container in deploy-job.
692
- --restart-policy <policy> Sets the restart policy for the job in deploy-job.
693
- --runtime-class-name <name> Sets the runtime class name for the job in deploy-job.
694
- --image-pull-policy <policy> Sets the image pull policy for the job in deploy-job.
695
- --api-version <version> Sets the API version for the job manifest in deploy-job.
696
- --labels <labels> Optional: Specifies a comma-separated list of key-value pairs for labels (e.g., "app=my-app,env=prod").
697
- --claim-name <name> Optional: Specifies the claim name for volume mounting in deploy-job.
698
- --kind <kind-type> Specifies the kind of Kubernetes resource (e.g., Job, Deployment) for deploy-job.
699
- --kubeadm Flag to indicate Kubeadm cluster type context
700
- --k3s Flag to indicate K3s cluster type context
701
- --force Forces operation, overriding any warnings or conflicts.
702
- --tls Enables TLS for the runner execution.
703
- --reset Resets the runner state before execution.
704
- --terminal Enables terminal mode for interactive script execution.
705
- --dev-proxy-port-offset <port-offset> Sets a custom port offset for development proxy.
706
- --host-network Enables host network mode for the runner execution.
707
- --conf-server-path <conf-server-path> Sets a custom configuration server path.
708
- --underpost-root <underpost-root> Sets a custom Underpost root path.
709
- -h, --help display help for command
671
+ --command <command-array> Array of commands to run.
672
+ --args <args-array> Array of arguments to pass to the command.
673
+ --dev Sets the development context environment for the script.
674
+ --build Set builder context runner
675
+ --replicas <replicas> Sets a custom number of replicas for deployment.
676
+ --pod-name <pod-name> Optional: Specifies the pod name for execution.
677
+ --node-name <node-name> Optional: Specifies the node name for execution.
678
+ --port <port> Optional: Specifies the port for execution.
679
+ --etc-hosts Enables etc-hosts context for the runner execution.
680
+ --volume-host-path <volume-host-path> Optional: Specifies the volume host path for test execution.
681
+ --volume-mount-path <volume-mount-path> Optional: Specifies the volume mount path for test execution.
682
+ --volume-type <volume-type> Optional: Specifies the volume type for test execution.
683
+ --image-name <image-name> Optional: Specifies the image name for test execution.
684
+ --container-name <container-name> Optional: Specifies the container name for test execution.
685
+ --namespace <namespace> Optional: Specifies the namespace for test execution.
686
+ --tty Enables TTY for the container in deploy-job.
687
+ --stdin Keeps STDIN open for the container in deploy-job.
688
+ --restart-policy <policy> Sets the restart policy for the job in deploy-job.
689
+ --runtime-class-name <name> Sets the runtime class name for the job in deploy-job.
690
+ --image-pull-policy <policy> Sets the image pull policy for the job in deploy-job.
691
+ --api-version <version> Sets the API version for the job manifest in deploy-job.
692
+ --labels <labels> Optional: Specifies a comma-separated list of key-value pairs for labels (e.g., "app=my-app,env=prod").
693
+ --claim-name <name> Optional: Specifies the claim name for volume mounting in deploy-job.
694
+ --kind <kind-type> Specifies the kind of Kubernetes resource (e.g., Job, Deployment) for deploy-job.
695
+ --kubeadm Flag to indicate Kubeadm cluster type context
696
+ --k3s Flag to indicate K3s cluster type context
697
+ --force Forces operation, overriding any warnings or conflicts.
698
+ --tls Enables TLS for the runner execution.
699
+ --reset Resets the runner state before execution.
700
+ --terminal Enables terminal mode for interactive script execution.
701
+ --dev-proxy-port-offset <port-offset> Sets a custom port offset for development proxy.
702
+ --host-network Enables host network mode for the runner execution.
703
+ --requests-memory <requests-memory> Requests memory limit for the runner execution.
704
+ --requests-cpu <requests-cpu> Requests CPU limit for the runner execution.
705
+ --limits-memory <limits-memory> Sets memory limit for the runner execution.
706
+ --limits-cpu <limits-cpu> Sets CPU limit for the runner execution.
707
+ --resource-template-id <resource-template-id > Specifies a resource template ID for the runner execution.
708
+ --etcHosts Enables /etc/hosts management for the runner execution.
709
+ --expose Enables service exposure for the runner execution.
710
+ --conf-server-path <conf-server-path> Sets a custom configuration server path.
711
+ --underpost-root <underpost-root> Sets a custom Underpost root path.
712
+ -h, --help display help for command
710
713
 
711
714
  ```
712
715
 
@@ -17,7 +17,7 @@ spec:
17
17
  spec:
18
18
  containers:
19
19
  - name: dd-default-development-blue
20
- image: localhost/rockylinux9-underpost:v2.89.45
20
+ image: localhost/rockylinux9-underpost:v2.90.0
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.89.45
103
+ image: localhost/rockylinux9-underpost:v2.90.0
104
104
  # resources:
105
105
  # requests:
106
106
  # memory: "124Ki"
@@ -18,22 +18,14 @@ spec:
18
18
  spec:
19
19
  containers:
20
20
  - name: dd-test-development-blue
21
- image: localhost/rockylinux9-underpost:v2.89.45
22
- # resources:
23
- # requests:
24
- # memory: "96294Ki"
25
- # cpu: "75m"
26
- # limits:
27
- # memory: "1540709Ki"
28
- # cpu: "1200m"
21
+ image: localhost/rockylinux9-underpost:v2.90.0
22
+
29
23
  command:
30
24
  - /bin/sh
31
25
  - -c
32
26
  - >
33
- npm install -g npm@11.2.0 &&
34
- npm install -g underpost &&
35
- underpost secret underpost --create-from-file /etc/config/.env.development &&
36
- underpost start --build --run dd-test development
27
+ npm install -g npm@11.2.0 && npm install -g underpost && underpost secret underpost --create-from-file /etc/config/.env.development && underpost start --build --run dd-test development
28
+
37
29
 
38
30
  volumeMounts:
39
31
  - name: config-volume-dd-test-development-blue
@@ -111,22 +103,14 @@ spec:
111
103
  spec:
112
104
  containers:
113
105
  - name: dd-test-development-green
114
- image: localhost/rockylinux9-underpost:v2.89.45
115
- # resources:
116
- # requests:
117
- # memory: "96294Ki"
118
- # cpu: "75m"
119
- # limits:
120
- # memory: "1540709Ki"
121
- # cpu: "1200m"
106
+ image: localhost/rockylinux9-underpost:v2.90.0
107
+
122
108
  command:
123
109
  - /bin/sh
124
110
  - -c
125
111
  - >
126
- npm install -g npm@11.2.0 &&
127
- npm install -g underpost &&
128
- underpost secret underpost --create-from-file /etc/config/.env.development &&
129
- underpost start --build --run dd-test development
112
+ npm install -g npm@11.2.0 && npm install -g underpost && underpost secret underpost --create-from-file /etc/config/.env.development && underpost start --build --run dd-test development
113
+
130
114
 
131
115
  volumeMounts:
132
116
  - name: config-volume-dd-test-development-green
@@ -40,7 +40,7 @@ sudo dnf -y update
40
40
 
41
41
  # --- NVM and Node.js Installation ---
42
42
  echo "Installing NVM and Node.js v24.10.0..."
43
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
43
+ curl -o- https://cdn.jsdelivr.net/gh/nvm-sh/nvm@v0.40.1/install.sh | bash
44
44
 
45
45
  # Load nvm for the current session
46
46
  export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "main": "src/index.js",
4
4
  "name": "underpost",
5
- "version": "2.89.45",
5
+ "version": "2.90.0",
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",
package/scripts/nvim.sh CHANGED
@@ -12,7 +12,7 @@ mkdir -p ~/.local/share/nvim/site/autoload
12
12
 
13
13
  # Install vim-plug for Neovim
14
14
  curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
15
- https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
15
+ https://cdn.jsdelivr.net/gh/junegunn/vim-plug@master/plug.vim
16
16
 
17
17
  # Create an init.vim with nvim-tree.lua + web-devicons + gruvbox (theme)
18
18
  cat > ~/.config/nvim/init.vim <<'EOF'
@@ -117,10 +117,6 @@ class UnderpostCluster {
117
117
  const npmRoot = getNpmRootPath();
118
118
  const underpostRoot = options?.dev === true ? '.' : `${npmRoot}/underpost`;
119
119
 
120
- // Information gathering options
121
- if (options.infoCapacityPod === true) return logger.info('', UnderpostDeploy.API.resourcesFactory());
122
- if (options.infoCapacity === true)
123
- return logger.info('', UnderpostCluster.API.getResourcesCapacity(options.kubeadm || options.k3s)); // Adjust for k3s
124
120
  if (options.listPods === true) return console.table(UnderpostDeploy.API.get(podName ?? undefined));
125
121
  // Set default namespace if not specified
126
122
  if (!options.namespace) options.namespace = 'default';
@@ -235,10 +231,10 @@ class UnderpostCluster {
235
231
  // Install Calico CNI
236
232
  logger.info('Installing Calico CNI...');
237
233
  shellExec(
238
- `sudo kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.29.3/manifests/tigera-operator.yaml`,
234
+ `sudo kubectl create -f https://cdn.jsdelivr.net/gh/projectcalico/calico@v3.29.3/manifests/tigera-operator.yaml`,
239
235
  );
240
236
  shellExec(
241
- `kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.29.3/manifests/custom-resources.yaml`,
237
+ `kubectl create -f https://cdn.jsdelivr.net/gh/projectcalico/calico@v3.29.3/manifests/custom-resources.yaml`,
242
238
  );
243
239
  shellExec(`sudo kubectl apply -f ${underpostRoot}/manifests/kubeadm-calico-config.yaml`);
244
240
 
@@ -248,7 +244,7 @@ class UnderpostCluster {
248
244
  // Install local-path-provisioner for dynamic PVCs (optional but recommended)
249
245
  logger.info('Installing local-path-provisioner...');
250
246
  shellExec(
251
- `kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml`,
247
+ `kubectl apply -f https://cdn.jsdelivr.net/gh/rancher/local-path-provisioner@master/deploy/local-path-storage.yaml`,
252
248
  );
253
249
  } else {
254
250
  // Kind cluster initialization (if not using kubeadm or k3s)
@@ -314,18 +310,6 @@ EOF
314
310
  ${yaml}
315
311
  EOF
316
312
  `);
317
-
318
- // https://grafana.com/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/configuration/config-other-methods/prometheus/prometheus-operator/
319
- // shellExec(
320
- // `kubectl create -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/master/bundle.yaml`,
321
- // );
322
- // shellExec(`kubectl apply -f ${underpostRoot}/manifests/prometheus/prometheus-cr.yaml`);
323
- // shellExec(`kubectl rollout status sts prometheus-prometheus -n default`);
324
- // shellExec(`kubectl apply -f ${underpostRoot}/manifests/prometheus/prometheus-server.yaml`);
325
- // shellExec(`helm repo add prometheus-community https://prometheus-community.github.io/helm-charts`);
326
- // shellExec(`helm repo update`);
327
- // shellExec(`helm install prometheus prometheus-community/prometheus`);
328
- // shellExec(`kubectl rollout status deployment prometheus-server -n default`);
329
313
  }
330
314
 
331
315
  if (options.full === true || options.valkey === true) {
@@ -455,7 +439,9 @@ EOF
455
439
  }
456
440
 
457
441
  if (options.full === true || options.contour === true) {
458
- shellExec(`kubectl apply -f https://projectcontour.io/quickstart/contour.yaml`);
442
+ shellExec(
443
+ `kubectl apply -f https://cdn.jsdelivr.net/gh/projectcontour/contour@release-1.33/examples/render/contour.yaml`,
444
+ );
459
445
  if (options.kubeadm === true) {
460
446
  // Envoy service might need NodePort for kubeadm
461
447
  shellExec(
@@ -786,7 +772,7 @@ EOF`);
786
772
  shellExec(`sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes`);
787
773
 
788
774
  // Install Helm
789
- shellExec(`curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3`);
775
+ shellExec(`curl -fsSL -o get_helm.sh https://cdn.jsdelivr.net/gh/helm/helm@main/scripts/get-helm-3`);
790
776
  shellExec(`chmod 700 get_helm.sh`);
791
777
  shellExec(`./get_helm.sh`);
792
778
  shellExec(`chmod +x /usr/local/bin/helm`);
package/src/cli/db.js CHANGED
@@ -147,18 +147,20 @@ class UnderpostDB {
147
147
  for (const podNameData of [podNames[0]]) {
148
148
  const podName = podNameData.NAME;
149
149
  if (options.import === true) {
150
- shellExec(`sudo kubectl exec -i ${podName} -- sh -c "rm -rf /${dbName}.sql"`);
150
+ shellExec(`sudo kubectl exec -n ${nameSpace} -i ${podName} -- sh -c "rm -rf /${dbName}.sql"`);
151
151
  shellExec(`sudo kubectl cp ${_toSqlPath} ${nameSpace}/${podName}:/${dbName}.sql`);
152
152
  const cmd = `mariadb -u ${user} -p${password} ${dbName} < /${dbName}.sql`;
153
153
  shellExec(
154
- `kubectl exec -i ${podName} -- ${serviceName} -p${password} -e 'CREATE DATABASE ${dbName};'`,
154
+ `kubectl exec -n ${nameSpace} -i ${podName} -- ${serviceName} -p${password} -e 'CREATE DATABASE ${dbName};'`,
155
155
  );
156
- shellExec(`sudo kubectl exec -i ${podName} -- sh -c "${cmd}"`);
156
+ shellExec(`sudo kubectl exec -n ${nameSpace} -i ${podName} -- sh -c "${cmd}"`);
157
157
  }
158
158
  if (options.export === true) {
159
- shellExec(`sudo kubectl exec -i ${podName} -- sh -c "rm -rf ${sqlContainerPath}"`);
159
+ shellExec(
160
+ `sudo kubectl exec -n ${nameSpace} -i ${podName} -- sh -c "rm -rf ${sqlContainerPath}"`,
161
+ );
160
162
  const cmd = `mariadb-dump --user=${user} --password=${password} --lock-tables ${dbName} > ${sqlContainerPath}`;
161
- shellExec(`sudo kubectl exec -i ${podName} -- sh -c "${cmd}"`);
163
+ shellExec(`sudo kubectl exec -n ${nameSpace} -i ${podName} -- sh -c "${cmd}"`);
162
164
  shellExec(
163
165
  `sudo kubectl cp ${nameSpace}/${podName}:${sqlContainerPath} ${
164
166
  options.outPath ? options.outPath : _toNewSqlPath
@@ -179,7 +181,7 @@ class UnderpostDB {
179
181
  // `mongodb-0`;
180
182
  for (const podNameData of [podNames[0]]) {
181
183
  const podName = podNameData.NAME;
182
- shellExec(`sudo kubectl exec -i ${podName} -- sh -c "rm -rf /${dbName}"`);
184
+ shellExec(`sudo kubectl exec -n ${nameSpace} -i ${podName} -- sh -c "rm -rf /${dbName}"`);
183
185
  shellExec(
184
186
  `sudo kubectl cp ${
185
187
  options.outPath ? options.outPath : _toBsonPath
@@ -188,7 +190,7 @@ class UnderpostDB {
188
190
  const cmd = `mongorestore -d ${dbName} /${dbName}${options.drop ? ' --drop' : ''}${
189
191
  options.preserveUUID ? ' --preserveUUID' : ''
190
192
  }`;
191
- shellExec(`sudo kubectl exec -i ${podName} -- sh -c "${cmd}"`);
193
+ shellExec(`sudo kubectl exec -n ${nameSpace} -i ${podName} -- sh -c "${cmd}"`);
192
194
  }
193
195
  }
194
196
  if (options.export === true) {
@@ -198,13 +200,16 @@ class UnderpostDB {
198
200
  : UnderpostDeploy.API.get('mongo'); // `backup-access`;
199
201
  for (const podNameData of [podNames[0]]) {
200
202
  const podName = podNameData.NAME;
201
- shellExec(`sudo kubectl exec -i ${podName} -- sh -c "rm -rf /${dbName}"`);
203
+ shellExec(`sudo kubectl exec -n ${nameSpace} -i ${podName} -- sh -c "rm -rf /${dbName}"`);
202
204
  if (options.collections)
203
205
  for (const collection of options.collections.split(','))
204
206
  shellExec(
205
- `sudo kubectl exec -i ${podName} -- sh -c "mongodump -d ${dbName} --collection ${collection} -o /"`,
207
+ `sudo kubectl exec -n ${nameSpace} -i ${podName} -- sh -c "mongodump -d ${dbName} --collection ${collection} -o /"`,
206
208
  );
207
- else shellExec(`sudo kubectl exec -i ${podName} -- sh -c "mongodump -d ${dbName} -o /"`);
209
+ else
210
+ shellExec(
211
+ `sudo kubectl exec -n ${nameSpace} -i ${podName} -- sh -c "mongodump -d ${dbName} -o /"`,
212
+ );
208
213
  shellExec(
209
214
  `sudo kubectl cp ${nameSpace}/${podName}:/${dbName} ${
210
215
  options.outPath ? options.outPath : _toNewBsonPath
@@ -311,6 +316,25 @@ class UnderpostDB {
311
316
  }
312
317
  }
313
318
  }
319
+ if (fs.existsSync(`./engine-private/conf/${deployId}/conf.instances.json`)) {
320
+ const confInstances = JSON.parse(
321
+ fs.readFileSync(`./engine-private/conf/${deployId}/conf.instances.json`, 'utf8'),
322
+ );
323
+ for (const instance of confInstances) {
324
+ const { id, host, path, fromPort, metadata } = instance;
325
+ const { runtime } = metadata;
326
+ const body = {
327
+ deployId,
328
+ host,
329
+ path,
330
+ port: fromPort,
331
+ client: id,
332
+ runtime,
333
+ };
334
+ logger.info('Instance save', body);
335
+ await new Instance(body).save();
336
+ }
337
+ }
314
338
  }
315
339
  } catch (error) {
316
340
  logger.error(error, error.stack);