Skip to content

Commit 03ed01e

Browse files
author
underpostnet
committed
ci(package-pwa-microservices-template-ghpkg): ⚙️ Update github repo package
1 parent 561e749 commit 03ed01e

File tree

8 files changed

+16
-8
lines changed

8 files changed

+16
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Run dev client server
6868
npm run dev
6969
```
7070
<!-- -->
71-
## underpost ci/cd cli v2.8.787
71+
## underpost ci/cd cli v2.8.788
7272

7373
### Usage: `underpost [options] [command]`
7474
```

cli.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## underpost ci/cd cli v2.8.787
1+
## underpost ci/cd cli v2.8.788
22

33
### Usage: `underpost [options] [command]`
44
```
@@ -482,6 +482,7 @@ Options:
482482
--create-virtual-network Create lxd virtual network bridge
483483
--create-admin-profile Create admin profile for lxd management
484484
--control set control node vm context
485+
--worker set worker node context
485486
--create-vm <vm-id> Create default virtual machines
486487
--init-vm <vm-id> Get init vm underpost script
487488
--info-vm <vm-id> Get all info vm

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ services:
5858
cpus: '0.25'
5959
memory: 20M
6060
labels: # labels in Compose file instead of Dockerfile
61-
engine.version: '2.8.787'
61+
engine.version: '2.8.788'
6262
networks:
6363
- load-balancer
6464

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type": "module",
33
"main": "src/index.js",
44
"name": "@underpostnet/underpost",
5-
"version": "2.8.787",
5+
"version": "2.8.788",
66
"description": "pwa api rest template",
77
"scripts": {
88
"start": "env-cmd -f .env.production node --max-old-space-size=8192 src/server",

src/cli/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ program
279279
.option('--create-virtual-network', 'Create lxd virtual network bridge')
280280
.option('--create-admin-profile', 'Create admin profile for lxd management')
281281
.option('--control', 'set control node vm context')
282+
.option('--worker', 'set worker node context')
282283
.option('--create-vm <vm-id>', 'Create default virtual machines')
283284
.option('--init-vm <vm-id>', 'Get init vm underpost script')
284285
.option('--info-vm <vm-id>', 'Get all info vm')

src/cli/lxd.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { getNpmRootPath } from '../server/conf.js';
2+
import { getLocalIPv4Address } from '../server/dns.js';
23
import { pbcopy, shellExec } from '../server/process.js';
4+
import fs from 'fs-extra';
35

46
class UnderpostLxd {
57
static API = {
@@ -28,7 +30,11 @@ class UnderpostLxd {
2830
if (options.init === true) {
2931
shellExec(`sudo systemctl start snap.lxd.daemon`);
3032
shellExec(`sudo systemctl status snap.lxd.daemon`);
31-
shellExec(`lxd init --preseed < ${underpostRoot}/manifests/lxd/lxd-preseed.yaml`);
33+
const lxdPressedContent = fs
34+
.readFileSync(`${underpostRoot}/manifests/lxd/lxd-preseed.yaml`, 'utf8')
35+
.replaceAll(`127.0.0.1`, getLocalIPv4Address());
36+
// shellExec(`lxd init --preseed < ${underpostRoot}/manifests/lxd/lxd-preseed.yaml`);
37+
shellExec(`echo "${lxdPressedContent}" | lxd init --preseed`);
3238
shellExec(`lxc cluster list`);
3339
}
3440
if (options.createVirtualNetwork === true) {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Underpost {
3131
* @type {String}
3232
* @memberof Underpost
3333
*/
34-
static version = 'v2.8.787';
34+
static version = 'v2.8.788';
3535
/**
3636
* Repository cli API
3737
* @static

0 commit comments

Comments
 (0)