underpost 2.8.852 → 2.8.854

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 CHANGED
@@ -1,4 +1,4 @@
1
- DEPLOY_ID=dd-template
1
+ DEPLOY_ID=dd-default
2
2
  NODE_ENV=development
3
3
  PORT=4000
4
4
  JWT_SECRET=test
package/.env.production CHANGED
@@ -1,4 +1,4 @@
1
- DEPLOY_ID=dd-template
1
+ DEPLOY_ID=dd-default
2
2
  NODE_ENV=production
3
3
  PORT=3000
4
4
  JWT_SECRET=test
package/.env.test CHANGED
@@ -1,4 +1,4 @@
1
- DEPLOY_ID=dd-template
1
+ DEPLOY_ID=dd-default
2
2
  NODE_ENV=test
3
3
  PORT=5000
4
4
  JWT_SECRET=test
@@ -54,7 +54,7 @@ jobs:
54
54
  npm install -g underpost
55
55
  npm install
56
56
  node bin/deploy update-default-conf ghpkg
57
- env-cmd -f .env.production node bin/deploy build-full-client github-pages underpostnet.github.io /pwa-microservices-template-ghpkg
57
+ env-cmd -f .env.production node bin/deploy build-full-client dd-github-pages underpostnet.github.io /pwa-microservices-template-ghpkg
58
58
  # git lfs install
59
59
  # git lfs track
60
60
  # git lfs ls-files
@@ -0,0 +1,35 @@
1
+ name: CD | Release deployment | remote ssh
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows: ['CI | Publish npm package']
6
+ types:
7
+ - completed
8
+
9
+ jobs:
10
+ after-publish:
11
+ if: github.repository == 'underpostnet/pwa-microservices-template'
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Run remote deploy via SSH
15
+ uses: appleboy/ssh-action@v1.2.2
16
+ with:
17
+ # Remote host (secret)
18
+ host: ${{ secrets.SSH_HOST }}
19
+ # Remote user (secret)
20
+ username: ${{ secrets.SSH_USERNAME }}
21
+ # Private key (secret) — the PEM contents (not a path)
22
+ key: ${{ secrets.SSH_PRIV_KEY }}
23
+ # Remote port (optional)
24
+ port: ${{ secrets.SSH_PORT }}
25
+ # Optional: if your private key has a passphrase, add:
26
+ # passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
27
+ # Commands to run on the remote VM
28
+ script: |
29
+ set -e
30
+ echo "Starting remote release deploy"
31
+ cd /home/dd/engine
32
+ node bin run --dev upgrade
33
+ underpost run deploy dd-core
34
+ underpost run deploy dd-cyberia
35
+ underpost run deploy dd-lampp
package/README.md CHANGED
@@ -1,16 +1,10 @@
1
1
  <p align="center">
2
- <img src="https://underpost.net/assets/splash/apple-touch-icon-precomposed.png" alt="underpost.net"/>
2
+ <img src="https://underpost.net/assets/splash/apple-touch-icon-precomposed.png" alt="underpost engine core server"/>
3
3
  </p>
4
4
 
5
5
  <div align="center">
6
6
 
7
- ### underpost.net
8
-
9
- </div>
10
-
11
- <div align="center">
12
-
13
- template
7
+ <h1>underpost</h1>
14
8
 
15
9
  </div>
16
10
 
@@ -24,77 +18,23 @@ template
24
18
 
25
19
 
26
20
 
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
21
  <!-- badges -->
55
22
 
56
23
 
57
- [![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.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.8.852)](https://socket.dev/npm/package/underpost/overview/2.8.852) [![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)
24
+ [![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.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.8.854)](https://socket.dev/npm/package/underpost/overview/2.8.854) [![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)
58
25
 
59
26
 
60
27
  <!-- end-badges -->
61
28
 
62
29
 
63
30
 
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
31
  </div>
92
32
 
93
33
  <div align="center">
94
34
 
95
35
  #### Base template for pwa/api-rest projects.
96
36
 
97
- Develop, build, deploy, test, monitor, and manage multiple runtime applications on virtual machines or container instances.
37
+ <div style="font-size: 20px;"><em>End2end</em> continuous integration and continuous deployment cloud to applications federation tools. Develop, build, deploy, test, monitor, and manage multiple runtime applications on virtual machines or container instances.</div>
98
38
 
99
39
  </div>
100
40
 
@@ -132,7 +72,7 @@ Run dev client server
132
72
  npm run dev
133
73
  ```
134
74
  <!-- -->
135
- ## underpost ci/cd cli v2.8.852
75
+ ## underpost ci/cd cli v2.8.854
136
76
 
137
77
  ### Usage: `underpost [options] [command]`
138
78
  ```
@@ -157,6 +97,7 @@ Commands:
157
97
  dockerfile-pull-base-images [options] Pulls required Underpost Dockerfile base images and optionally loads them into clusters.
158
98
  install Quickly imports Underpost npm dependencies by copying them.
159
99
  db [options] <deploy-list> Manages database operations, including import, export, and collection management.
100
+ metadata [options] [deploy-id] [host] [path] Manages cluster metadata operations, including import and export.
160
101
  script [options] <operator> <script-name> [script-value] Supports a variety of built-in Underpost global scripts, their preset lifecycle events, and arbitrary custom scripts.
161
102
  cron [options] [deploy-list] [job-list] Manages cron jobs, including initialization, execution, and configuration updates.
162
103
  fs [options] [path] Manages file storage, defaulting to file upload operations.
package/bin/db.js CHANGED
@@ -4,7 +4,7 @@ import { loggerFactory } from '../src/server/logger.js';
4
4
  import { MariaDB } from '../src/db/mariadb/MariaDB.js';
5
5
  import { Xampp } from '../src/runtime/xampp/Xampp.js';
6
6
  import { Lampp } from '../src/runtime/lampp/Lampp.js';
7
- import { getCapVariableName, getRestoreCronCmd, loadConf, splitFileFactory } from '../src/server/conf.js';
7
+ import { getCapVariableName, loadConf, splitFileFactory } from '../src/server/conf.js';
8
8
  import { DataBaseProvider } from '../src/db/DataBaseProvider.js';
9
9
  import { hashPassword } from '../src/server/auth.js';
10
10
 
@@ -104,7 +104,6 @@ try {
104
104
  }
105
105
  break;
106
106
  case 'import':
107
- shellExec(await getRestoreCronCmd({ host, path, conf: confServer, deployId }));
108
107
  break;
109
108
  case 'init-xampp-service':
110
109
  await Xampp.initService();
@@ -182,7 +181,6 @@ try {
182
181
  break;
183
182
  case 'import':
184
183
  // mongorestore -d <database_name> <directory_backup>
185
- shellExec(await getRestoreCronCmd({ host, path, conf: confServer, deployId }));
186
184
  break;
187
185
  case 'init-service':
188
186
  break;
package/bin/deploy.js CHANGED
@@ -17,31 +17,17 @@ import {
17
17
  addWsConf,
18
18
  buildWsSrc,
19
19
  cloneSrcComponents,
20
- getDeployGroupId,
21
- deployRun,
22
20
  getDataDeploy,
23
21
  buildReplicaId,
24
22
  Cmd,
25
- restoreMacroDb,
26
- fixDependencies,
27
- setUpProxyMaintenanceServer,
28
23
  writeEnv,
29
- getUnderpostRootPath,
30
24
  buildCliDoc,
31
25
  } from '../src/server/conf.js';
32
26
  import { buildClient } from '../src/server/client-build.js';
33
- import { range, s4, setPad, timer, uniqueArray } from '../src/client/components/core/CommonJs.js';
34
- import { MongooseDB } from '../src/db/mongo/MongooseDB.js';
35
- import { Lampp } from '../src/runtime/lampp/Lampp.js';
36
27
  import { DefaultConf } from '../conf.js';
37
- import { JSONweb } from '../src/server/client-formatted.js';
38
-
39
- import { Xampp } from '../src/runtime/xampp/Xampp.js';
40
- import { ejs } from '../src/server/json-schema.js';
41
- import { getLocalIPv4Address, ip } from '../src/server/dns.js';
42
- import { Downloader } from '../src/server/downloader.js';
43
28
  import colors from 'colors';
44
29
  import { program } from '../src/cli/index.js';
30
+ import { getLocalIPv4Address, ip } from '../src/server/dns.js';
45
31
 
46
32
  colors.enable();
47
33
 
@@ -55,7 +41,8 @@ try {
55
41
  switch (operator) {
56
42
  case 'save':
57
43
  {
58
- const deployId = process.argv[3];
44
+ let deployId = process.argv[3] ?? 'dd-default';
45
+ if (!deployId.startsWith('dd-')) deployId = 'dd-' + deployId;
59
46
  const folder = `./engine-private/conf/${deployId}`;
60
47
  if (fs.existsSync(folder)) fs.removeSync(folder);
61
48
  await Config.build({ folder });
@@ -258,176 +245,6 @@ try {
258
245
  }
259
246
  break;
260
247
 
261
- case 'xampp': {
262
- const directory = 'c:/xampp/htdocs';
263
- const host = 'localhost';
264
- const port = 80;
265
- Xampp.removeRouter();
266
- Xampp.appendRouter(` Listen ${port}
267
- <VirtualHost *:${port}>
268
- DocumentRoot "${directory}"
269
- ServerName ${host}:${port}
270
-
271
- <Directory "${directory}">
272
- Options Indexes FollowSymLinks MultiViews
273
- AllowOverride All
274
- Require all granted
275
- </Directory>
276
-
277
- </VirtualHost>
278
- `);
279
- if (Xampp.enabled() && Xampp.router) Xampp.initService({ daemon: true });
280
- break;
281
- }
282
-
283
- case 'adminer': {
284
- const directory = '/home/dd/engine/public/adminer';
285
- // const host = '127.0.0.1';
286
- const host = 'localhost';
287
- const port = 80;
288
- if (!process.argv.includes('server')) {
289
- if (fs.existsSync(directory)) fs.removeSync(directory);
290
- fs.mkdirSync(directory, { recursive: true });
291
- shellExec(`cd ${directory} && wget https://www.adminer.org/latest.php -O adminer.php`);
292
- }
293
- Lampp.removeRouter();
294
- Lampp.appendRouter(` Listen ${port}
295
- <VirtualHost *:${port}>
296
- DocumentRoot "${directory}"
297
- ServerName ${host}:${port}
298
-
299
- <Directory "${directory}">
300
- Options Indexes FollowSymLinks MultiViews
301
- AllowOverride All
302
- Require all granted
303
- </Directory>
304
-
305
- </VirtualHost>
306
- `);
307
- if (Lampp.enabled() && Lampp.router) Lampp.initService({ daemon: true });
308
- shellExec(`open /opt/lampp/apache2/conf/httpd.conf`);
309
- break;
310
- }
311
-
312
- case 'pma':
313
- {
314
- const directory = '/home/dd/engine/public/phpmyadmin';
315
- // const host = '127.0.0.1';
316
- const host = 'localhost';
317
- const port = 80;
318
- // data config path: /etc/phpmyadmin
319
-
320
- // The config.inc.php file is not required, and only needed for custom configurations
321
-
322
- // phpmyadmin will first refer to ./libraries/config.default.php to retrieve the default values.
323
-
324
- // If for some reason you need to modify the default values, and the ./config.inc.php
325
- // file doesn't exist, you will need to create one as per the Installation documentation.
326
-
327
- // You will also need to configure pmadb for some of phpmyadmin's special features such as bookmarks.
328
-
329
- // CREATE USER 'pma'@'localhost' IDENTIFIED VIA mysql_native_password USING 'pmapass';
330
- // GRANT SELECT, INSERT, UPDATE, DELETE ON `<pma_db>`.* TO 'pma'@'localhost';
331
-
332
- if (!process.argv.includes('server')) {
333
- // if (fs.existsSync(directory)) fs.removeSync(directory);
334
- shellExec(`sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl`);
335
- shellExec(`sudo phpenmod mbstring`);
336
- shellExec(
337
- `cd /usr/share/phpmyadmin && git init && git add . && git commit -m "Base phpMyAdmin implementation"`,
338
- );
339
- }
340
-
341
- // if (!fs.existsSync(directory)) fs.mkdirSync(directory, { recursive: true });
342
- // if (!fs.existsSync('./public/phpmyadmin/phpmyadmin'))
343
- // fs.copySync('/usr/share/phpmyadmin', './public/phpmyadmin/phpmyadmin');
344
-
345
- Lampp.removeRouter();
346
- Lampp.appendRouter(` Listen ${port} `);
347
- if (Lampp.enabled() && Lampp.router) Lampp.initService({ daemon: true });
348
- // shellExec(`open /opt/lampp/apache2/conf/httpd.conf`);
349
-
350
- // Create a link in /var/www like this:
351
-
352
- // sudo ln -s /usr/share/phpmyadmin /var/www/
353
-
354
- // Note: since 14.04 you may want to use /var/www/html/ instead of /var/www/
355
-
356
- // If that's not working for you, you need to include PHPMyAdmin inside apache configuration.
357
-
358
- // Open apache.conf using your favorite editor, mine is vim :)
359
-
360
- // sudo vim /etc/apache2/apache2.conf
361
-
362
- // Then add the following line:
363
-
364
- // Include /etc/phpmyadmin/apache.conf
365
-
366
- // For Ubuntu 15.04 and 16.04
367
-
368
- // sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
369
- // sudo a2enconf phpmyadmin.conf
370
- // sudo service apache2 reload
371
- break;
372
- Lampp.appendRouter(` Listen ${port}
373
-
374
- <VirtualHost *:${port}>
375
- DocumentRoot "${directory}"
376
- ServerName ${host}:${port}
377
-
378
- <Directory "${directory}">
379
- Options Indexes FollowSymLinks MultiViews
380
- AllowOverride All
381
- Require all granted
382
- </Directory>
383
-
384
- </VirtualHost>`);
385
- // phpMyAdmin default Apache configuration:
386
- Lampp.appendRouter(`
387
-
388
- Listen ${port}
389
-
390
- Alias /phpmyadmin /usr/share/phpmyadmin
391
-
392
- <Directory /usr/share/phpmyadmin>
393
- Options Indexes FollowSymLinks
394
- DirectoryIndex index.php
395
-
396
- <IfModule mod_php5.c>
397
- AddType application/x-httpd-php .php
398
-
399
- php_flag magic_quotes_gpc Off
400
- php_flag track_vars On
401
- php_flag register_globals Off
402
- php_value include_path .
403
- </IfModule>
404
-
405
- </Directory>
406
-
407
- # Authorize for setup
408
- <Directory /usr/share/phpmyadmin/setup>
409
- <IfModule mod_authn_file.c>
410
- AuthType Basic
411
- AuthName "phpMyAdmin Setup"
412
- AuthUserFile /etc/phpmyadmin/htpasswd.setup
413
- </IfModule>
414
- Require valid-user
415
- </Directory>
416
-
417
- # Disallow web access to directories that don't need it
418
- <Directory /usr/share/phpmyadmin/libraries>
419
- Order Deny,Allow
420
- Deny from All
421
- </Directory>
422
- <Directory /usr/share/phpmyadmin/setup/lib>
423
- Order Deny,Allow
424
- Deny from All
425
- </Directory>
426
-
427
- `);
428
- }
429
- break;
430
-
431
248
  case 'update-dependencies':
432
249
  const files = await fs.readdir(`./engine-private/conf`, { recursive: true });
433
250
  const originPackage = JSON.parse(fs.readFileSync(`./package.json`, 'utf8'));
@@ -442,64 +259,6 @@ try {
442
259
  }
443
260
  break;
444
261
 
445
- case 'run-macro':
446
- {
447
- if (fs.existsSync(`./tmp/await-deploy`)) fs.remove(`./tmp/await-deploy`);
448
- const dataDeploy = getDataDeploy({
449
- deployGroupId: process.argv[3],
450
- buildSingleReplica: true,
451
- deployIdConcat: ['dd-proxy', 'dd-cron'],
452
- });
453
- if (!process.argv[4]) await setUpProxyMaintenanceServer({ deployGroupId: process.argv[3] });
454
- await deployRun(process.argv[4] ? dataDeploy.filter((d) => d.deployId.match(process.argv[4])) : dataDeploy);
455
- }
456
- break;
457
-
458
- case 'build-macro':
459
- {
460
- const dataDeploy = getDataDeploy({ deployGroupId: process.argv[3], buildSingleReplica: true });
461
- for (const deploy of dataDeploy) {
462
- if (!process.argv[4] || (process.argv[4] && process.argv[4] === deploy.deployId)) {
463
- shellExec(Cmd.conf(deploy.deployId));
464
- shellExec(Cmd.build(deploy.deployId));
465
- }
466
- }
467
- }
468
- break;
469
- case 'macro': {
470
- shellExec(`git checkout .`);
471
- shellExec(`node bin/deploy build-macro ${process.argv.slice(3).join(' ')}`);
472
- shellExec(`git checkout .`);
473
- shellExec(`node bin/deploy run-macro ${process.argv.slice(3).join(' ')}`);
474
- break;
475
- }
476
-
477
- case 'keep-server': {
478
- await setUpProxyMaintenanceServer({ deployGroupId: process.argv[3] });
479
- break;
480
- }
481
- case 'prometheus':
482
- case 'prom':
483
- {
484
- const rangePort = [1, 20];
485
- const promConfigPath = `./engine-private/prometheus/prometheus-service-config.yml`;
486
- const rawConfig = fs
487
- .readFileSync(promConfigPath, 'utf8')
488
- .replaceAll(
489
- `['']`,
490
- JSON.stringify(range(...rangePort).map((i) => `host.docker.internal:30${setPad(i, '0', 2)}`)).replaceAll(
491
- `"`,
492
- `'`,
493
- ),
494
- );
495
- console.log(rawConfig);
496
-
497
- fs.writeFileSync(promConfigPath, rawConfig, 'utf8');
498
-
499
- shellExec(`docker-compose -f engine-private/prometheus/prometheus-service.yml up -d`);
500
- }
501
- break;
502
-
503
262
  case 'sync-env-port':
504
263
  const dataDeploy = getDataDeploy({ deployGroupId: process.argv[3], disableSyncEnvPort: true });
505
264
  const dataEnv = [
@@ -584,9 +343,6 @@ try {
584
343
  }
585
344
  break;
586
345
  }
587
- case 'build-macro-replica':
588
- getDataDeploy({ deployGroupId: process.argv[3], buildSingleReplica: true });
589
- break;
590
346
 
591
347
  case 'rename-package': {
592
348
  const name = process.argv[3];
@@ -613,7 +369,7 @@ try {
613
369
  break;
614
370
  }
615
371
 
616
- case 'version-build': {
372
+ case 'clean-core-repo': {
617
373
  shellCd(`/home/dd/engine`);
618
374
  shellExec(`git reset`);
619
375
  shellExec(`git checkout .`);
@@ -623,6 +379,12 @@ try {
623
379
  shellExec(`git checkout .`);
624
380
  shellExec(`git clean -f -d`);
625
381
  shellCd(`/home/dd/engine`);
382
+ break;
383
+ }
384
+
385
+ case 'version-build': {
386
+ shellExec(`node bin clean-core-repo`);
387
+ shellCd(`/home/dd/engine`);
626
388
  const originPackageJson = JSON.parse(fs.readFileSync(`package.json`, 'utf8'));
627
389
  const newVersion = process.argv[3] ?? originPackageJson.version;
628
390
  const { version } = originPackageJson;
@@ -657,16 +419,9 @@ try {
657
419
  }
658
420
 
659
421
  fs.writeFileSync(
660
- `./docker-compose.yml`,
661
- fs
662
- .readFileSync(`./docker-compose.yml`, 'utf8')
663
- .replaceAll(`engine.version: '${version}'`, `engine.version: '${newVersion}'`),
664
- 'utf8',
665
- );
666
- fs.writeFileSync(
667
- `./manifests/deployment/dd-template-development/deployment.yaml`,
422
+ `./manifests/deployment/dd-default-development/deployment.yaml`,
668
423
  fs
669
- .readFileSync(`./manifests/deployment/dd-template-development/deployment.yaml`, 'utf8')
424
+ .readFileSync(`./manifests/deployment/dd-default-development/deployment.yaml`, 'utf8')
670
425
  .replaceAll(`underpost:v${version}`, `underpost:v${newVersion}`),
671
426
  'utf8',
672
427
  );
@@ -723,25 +478,6 @@ ${shellExec(`git log | grep Author: | sort -u`, { stdout: true }).split(`\n`).jo
723
478
  break;
724
479
  }
725
480
 
726
- case 'restore-macro-db':
727
- {
728
- const deployGroupId = process.argv[3];
729
- const deployId = process.argv[4];
730
- await restoreMacroDb(deployGroupId, deployId);
731
- }
732
-
733
- break;
734
-
735
- case 'mongo': {
736
- await MongooseDB.server();
737
- break;
738
- }
739
-
740
- case 'lampp': {
741
- await Lampp.install();
742
- break;
743
- }
744
-
745
481
  case 'heb': {
746
482
  // https://besu.hyperledger.org/
747
483
  // https://github.com/hyperledger/besu/archive/refs/tags/24.9.1.tar.gz
@@ -777,11 +513,6 @@ ${shellExec(`git log | grep Author: | sort -u`, { stdout: true }).split(`\n`).jo
777
513
  break;
778
514
  }
779
515
 
780
- case 'fix-deps': {
781
- await fixDependencies();
782
- break;
783
- }
784
-
785
516
  case 'update-default-conf': {
786
517
  const defaultServer = DefaultConf.server['default.net']['/'];
787
518
  let confName = process.argv[3];
@@ -984,74 +715,6 @@ EOF`);
984
715
  break;
985
716
  }
986
717
 
987
- case 'valkey': {
988
- if (!process.argv.includes('server')) {
989
- if (process.argv.includes('rocky')) {
990
- // shellExec(`yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm`);
991
- // shellExec(`sudo percona-release enable valkey experimental`);
992
- shellExec(`sudo dnf install valkey`);
993
- shellExec(`chown -R valkey:valkey /etc/valkey`);
994
- shellExec(`chown -R valkey:valkey /var/lib/valkey`);
995
- shellExec(`chown -R valkey:valkey /var/log/valkey`);
996
- shellExec(`sudo systemctl enable valkey.service`);
997
- shellExec(`sudo systemctl start valkey`);
998
- shellExec(`valkey-cli ping`);
999
- } else {
1000
- shellExec(`cd /home/dd && git clone https://github.com/valkey-io/valkey.git`);
1001
- shellExec(`cd /home/dd/valkey && make`);
1002
- shellExec(`apt install valkey-tools`); // valkey-cli
1003
- }
1004
- }
1005
- if (process.argv.includes('rocky')) {
1006
- shellExec(`sudo systemctl stop valkey`);
1007
- shellExec(`sudo systemctl start valkey`);
1008
- } else shellExec(`cd /home/dd/valkey && ./src/valkey-server`);
1009
-
1010
- break;
1011
- }
1012
-
1013
- case 'valkey-service': {
1014
- shellExec(`pm2 start bin/deploy.js --node-args=\"--max-old-space-size=8192\" --name valkey -- valkey server`);
1015
- break;
1016
- }
1017
-
1018
- case 'update-instances': {
1019
- shellExec(`node bin deploy dd production --sync --build-manifest --info-router --dashboard-update`);
1020
- shellExec(`node bin cron --dashboard-update --init`);
1021
- const deployId = 'dd-core';
1022
- const host = 'www.nexodev.org';
1023
- const path = '/';
1024
-
1025
- {
1026
- const outputPath = './engine-private/instances';
1027
- if (fs.existsSync(outputPath)) fs.mkdirSync(outputPath, { recursive: true });
1028
- const collection = 'instances';
1029
- if (process.argv.includes('export'))
1030
- shellExec(
1031
- `node bin db --export --collections ${collection} --out-path ${outputPath} --hosts ${host} --paths '${path}' ${deployId}`,
1032
- );
1033
- if (process.argv.includes('import'))
1034
- shellExec(
1035
- `node bin db --import --drop --preserveUUID --out-path ${outputPath} --hosts ${host} --paths '${path}' ${deployId}`,
1036
- );
1037
- }
1038
- {
1039
- const outputPath = './engine-private/crons';
1040
- if (fs.existsSync(outputPath)) fs.mkdirSync(outputPath, { recursive: true });
1041
- const collection = 'crons';
1042
- if (process.argv.includes('export'))
1043
- shellExec(
1044
- `node bin db --export --collections ${collection} --out-path ${outputPath} --hosts ${host} --paths '${path}' ${deployId}`,
1045
- );
1046
- if (process.argv.includes('import'))
1047
- shellExec(
1048
- `node bin db --import --drop --preserveUUID --out-path ${outputPath} --hosts ${host} --paths '${path}' ${deployId}`,
1049
- );
1050
- }
1051
-
1052
- break;
1053
- }
1054
-
1055
718
  case 'cli-docs': {
1056
719
  buildCliDoc(program, process.argv[3], process.argv[4]);
1057
720
  break;
package/bin/file.js CHANGED
@@ -83,6 +83,7 @@ try {
83
83
  './manifests/deployment/dd-lampp-development',
84
84
  './manifests/deployment/dd-cyberia-development',
85
85
  './manifests/deployment/dd-core-development',
86
+ './manifests/deployment/dd-template-development',
86
87
  'bin/web3.js',
87
88
  'bin/cyberia.js',
88
89
  ]) {
@@ -98,6 +99,7 @@ try {
98
99
  `./.github/workflows/npmpkg.ci.yml`,
99
100
  `./.github/workflows/ghpkg.ci.yml`,
100
101
  `./.github/workflows/publish.ci.yml`,
102
+ `./.github/workflows/release.cd.yml`,
101
103
  ])
102
104
  fs.copyFileSync(_path, `../pwa-microservices-template/${_path}`);
103
105