underpost 2.8.85 → 2.8.87
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 +7 -2
- package/.env.production +7 -2
- package/.env.test +7 -2
- package/.github/workflows/pwa-microservices-template-page.cd.yml +1 -1
- package/.github/workflows/release.cd.yml +37 -0
- package/README.md +7 -24
- package/bin/build.js +1 -0
- package/bin/db.js +1 -3
- package/bin/deploy.js +43 -368
- package/bin/file.js +16 -3
- package/bin/util.js +1 -56
- package/cli.md +46 -21
- package/conf.js +3 -3
- package/manifests/deployment/{dd-template-development → dd-default-development}/deployment.yaml +16 -16
- package/manifests/deployment/{dd-template-development → dd-default-development}/proxy.yaml +3 -3
- package/manifests/deployment/mongo-express/deployment.yaml +12 -12
- package/manifests/grafana/deployment.yaml +57 -0
- package/manifests/grafana/kustomization.yaml +7 -0
- package/manifests/grafana/pvc.yaml +12 -0
- package/manifests/grafana/service.yaml +14 -0
- package/manifests/maas/nvim.sh +91 -0
- package/manifests/maas/ssh-cluster-info.sh +14 -0
- package/manifests/prometheus/deployment.yaml +82 -0
- package/package.json +3 -12
- package/src/api/file/file.service.js +28 -8
- package/src/api/user/user.router.js +31 -5
- package/src/api/user/user.service.js +11 -38
- package/src/cli/cluster.js +45 -25
- package/src/cli/cron.js +12 -45
- package/src/cli/db.js +149 -19
- package/src/cli/deploy.js +41 -110
- package/src/cli/fs.js +1 -0
- package/src/cli/index.js +24 -7
- package/src/cli/monitor.js +1 -4
- package/src/cli/repository.js +15 -6
- package/src/cli/run.js +94 -16
- package/src/client/Default.index.js +0 -2
- package/src/client/components/core/Account.js +6 -2
- package/src/client/components/core/Content.js +11 -7
- package/src/client/components/core/Css.js +5 -1
- package/src/client/components/core/CssCore.js +12 -0
- package/src/client/components/core/FullScreen.js +19 -28
- package/src/client/components/core/Input.js +7 -1
- package/src/client/components/core/LogIn.js +3 -0
- package/src/client/components/core/LogOut.js +1 -1
- package/src/client/components/core/Modal.js +32 -43
- package/src/client/components/core/ObjectLayerEngine.js +229 -4
- package/src/client/components/core/ObjectLayerEngineModal.js +441 -0
- package/src/client/components/core/Recover.js +5 -2
- package/src/client/components/core/Scroll.js +65 -120
- package/src/client/components/core/SignUp.js +1 -0
- package/src/client/components/core/ToggleSwitch.js +15 -1
- package/src/client/components/core/VanillaJs.js +48 -2
- package/src/client/components/default/MenuDefault.js +2 -2
- package/src/client/components/default/RoutesDefault.js +3 -3
- package/src/client/public/default/assets/mailer/api-user-default-avatar.png +0 -0
- package/src/index.js +1 -1
- package/src/mailer/MailerProvider.js +37 -0
- package/src/server/client-build-docs.js +1 -1
- package/src/server/client-build-live.js +1 -1
- package/src/server/client-build.js +4 -12
- package/src/server/client-dev-server.js +1 -1
- package/src/server/client-icons.js +6 -78
- package/src/server/conf.js +83 -408
- package/src/server/proxy.js +2 -3
- package/src/server/runtime.js +1 -2
- package/src/server/start.js +5 -5
- package/test/api.test.js +3 -2
- package/docker-compose.yml +0 -67
- package/prometheus.yml +0 -36
package/cli.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## underpost ci/cd cli v2.8.
|
|
1
|
+
## underpost ci/cd cli v2.8.87
|
|
2
2
|
|
|
3
3
|
### Usage: `underpost [options] [command]`
|
|
4
4
|
```
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
-h, --help display help for command
|
|
8
8
|
|
|
9
9
|
Commands:
|
|
10
|
-
new <app-name>
|
|
10
|
+
new [options] <app-name> Initializes a new Underpost project with a predefined structure.
|
|
11
11
|
start [options] <deploy-id> [env] Initiates application servers, build pipelines, or other defined services based on the deployment ID.
|
|
12
12
|
clone [options] <uri> Clones a specified GitHub repository into the current directory.
|
|
13
13
|
pull [options] <path> <uri> Pulls the latest changes from a specified GitHub repository.
|
|
@@ -23,6 +23,7 @@ Commands:
|
|
|
23
23
|
dockerfile-pull-base-images [options] Pulls required Underpost Dockerfile base images and optionally loads them into clusters.
|
|
24
24
|
install Quickly imports Underpost npm dependencies by copying them.
|
|
25
25
|
db [options] <deploy-list> Manages database operations, including import, export, and collection management.
|
|
26
|
+
metadata [options] [deploy-id] [host] [path] Manages cluster metadata operations, including import and export.
|
|
26
27
|
script [options] <operator> <script-name> [script-value] Supports a variety of built-in Underpost global scripts, their preset lifecycle events, and arbitrary custom scripts.
|
|
27
28
|
cron [options] [deploy-list] [job-list] Manages cron jobs, including initialization, execution, and configuration updates.
|
|
28
29
|
fs [options] [path] Manages file storage, defaulting to file upload operations.
|
|
@@ -46,10 +47,12 @@ Commands:
|
|
|
46
47
|
Initializes a new Underpost project with a predefined structure.
|
|
47
48
|
|
|
48
49
|
Arguments:
|
|
49
|
-
app-name
|
|
50
|
+
app-name The name or deploy-id of the application to create.
|
|
50
51
|
|
|
51
52
|
Options:
|
|
52
|
-
-
|
|
53
|
+
--deploy-id Crete deploy ID conf env files
|
|
54
|
+
--dev Sets the development cli context
|
|
55
|
+
-h, --help display help for command
|
|
53
56
|
|
|
54
57
|
```
|
|
55
58
|
|
|
@@ -235,6 +238,9 @@ Options:
|
|
|
235
238
|
specified namespace.
|
|
236
239
|
--kubeadm Initializes the cluster using kubeadm for control
|
|
237
240
|
plane management.
|
|
241
|
+
--grafana Initializes the cluster with a Grafana deployment.
|
|
242
|
+
--prom [hosts] Initializes the cluster with a Prometheus Operator
|
|
243
|
+
deployment and monitor scrap for specified hosts.
|
|
238
244
|
--dev Initializes a development-specific cluster
|
|
239
245
|
configuration.
|
|
240
246
|
--list-pods Displays detailed information about all pods.
|
|
@@ -285,11 +291,11 @@ Options:
|
|
|
285
291
|
management commands.
|
|
286
292
|
--cert Resets TLS/SSL certificate secrets for
|
|
287
293
|
deployments.
|
|
294
|
+
--node <node> Sets optional node for deployment
|
|
295
|
+
operations.
|
|
288
296
|
--build-manifest Builds Kubernetes YAML manifests, including
|
|
289
297
|
deployments, services, proxies, and
|
|
290
298
|
secrets.
|
|
291
|
-
--dashboard-update Updates dashboard instance data with the
|
|
292
|
-
current router configuration.
|
|
293
299
|
--replicas <replicas> Sets a custom number of replicas for
|
|
294
300
|
deployments.
|
|
295
301
|
--versions <deployment-versions> A comma-separated list of custom deployment
|
|
@@ -301,10 +307,9 @@ Options:
|
|
|
301
307
|
current resource deployments.
|
|
302
308
|
--kubeadm Enables the kubeadm context for deployment
|
|
303
309
|
operations.
|
|
310
|
+
--etc-hosts Enables the etc-hosts context for
|
|
311
|
+
deployment operations.
|
|
304
312
|
--restore-hosts Restores default `/etc/hosts` entries.
|
|
305
|
-
--rebuild-clients-bundle Inside the container, rebuilds client
|
|
306
|
-
bundles (only static public or storage
|
|
307
|
-
client files).
|
|
308
313
|
-h, --help display help for command
|
|
309
314
|
|
|
310
315
|
```
|
|
@@ -427,6 +432,29 @@ Options:
|
|
|
427
432
|
```
|
|
428
433
|
|
|
429
434
|
|
|
435
|
+
### `metadata` :
|
|
436
|
+
```
|
|
437
|
+
Usage: underpost metadata [options] [deploy-id] [host] [path]
|
|
438
|
+
|
|
439
|
+
Manages cluster metadata operations, including import and export.
|
|
440
|
+
|
|
441
|
+
Arguments:
|
|
442
|
+
deploy-id The deployment ID to manage metadata.
|
|
443
|
+
host The host to manage metadata.
|
|
444
|
+
path The path to manage metadata.
|
|
445
|
+
|
|
446
|
+
Options:
|
|
447
|
+
--import Imports from local storage.
|
|
448
|
+
--export Exports to local storage.
|
|
449
|
+
--crons Apply to cron data collection
|
|
450
|
+
--instances Apply to instance data collection
|
|
451
|
+
--generate Generate cluster metadata
|
|
452
|
+
--itc Apply under container execution context
|
|
453
|
+
-h, --help display help for command
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
|
|
430
458
|
### `script` :
|
|
431
459
|
```
|
|
432
460
|
Usage: underpost script [options] <operator> <script-name> [script-value]
|
|
@@ -461,19 +489,16 @@ Manages cron jobs, including initialization, execution, and configuration
|
|
|
461
489
|
updates.
|
|
462
490
|
|
|
463
491
|
Arguments:
|
|
464
|
-
deploy-list
|
|
465
|
-
|
|
466
|
-
job-list
|
|
467
|
-
|
|
492
|
+
deploy-list A comma-separated list of deployment IDs (e.g.,
|
|
493
|
+
"default-a,default-b").
|
|
494
|
+
job-list A comma-separated list of job IDs. Options: callback,
|
|
495
|
+
getRelatedDeployId. Defaults to all available jobs.
|
|
468
496
|
|
|
469
497
|
Options:
|
|
470
|
-
--itc
|
|
471
|
-
|
|
472
|
-
--
|
|
473
|
-
--
|
|
474
|
-
--dashboard-update Updates dashboard cron data with the current job
|
|
475
|
-
configurations.
|
|
476
|
-
-h, --help display help for command
|
|
498
|
+
--itc Executes cron jobs within the container execution context.
|
|
499
|
+
--init Initializes cron jobs for the default deployment ID.
|
|
500
|
+
--git Uploads cron job configurations to GitHub.
|
|
501
|
+
-h, --help display help for command
|
|
477
502
|
|
|
478
503
|
```
|
|
479
504
|
|
|
@@ -574,7 +599,7 @@ Options:
|
|
|
574
599
|
Runs a script from the specified path.
|
|
575
600
|
|
|
576
601
|
Arguments:
|
|
577
|
-
runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, gpu-env, tf-gpu-test, dev-cluster, cyberia-ide, engine-ide, template-deploy, ssh-deploy, ide, monitor, db-client, cluster, deploy, tf-vae-test, deploy-job.
|
|
602
|
+
runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, underpost-config, gpu-env, tf-gpu-test, dev-cluster, ssh-cluster-info, cyberia-ide, engine-ide, template-deploy, clean, pull, release-deploy, ssh-deploy, ide, dev-client, dev-api, router-sync, monitor, db-client, promote, metrics, cluster, deploy, tf-vae-test, deploy-job.
|
|
578
603
|
path The absolute or relative directory path where the script is located.
|
|
579
604
|
|
|
580
605
|
Options:
|
package/conf.js
CHANGED
|
@@ -130,7 +130,7 @@ const DefaultConf = /**/ {
|
|
|
130
130
|
ssr: {
|
|
131
131
|
Default: {
|
|
132
132
|
head: ['Seo', 'Pwa', 'Css', 'DefaultScripts', 'Production'],
|
|
133
|
-
body: ['CacheControl', 'DefaultSplashScreen'
|
|
133
|
+
body: ['CacheControl', 'DefaultSplashScreen'],
|
|
134
134
|
mailer: { userVerifyEmail: 'DefaultVerifyEmail', userRecoverEmail: 'DefaultRecoverEmail' },
|
|
135
135
|
offline: [
|
|
136
136
|
{ path: '/offline', title: 'No Network Connection', client: 'NoNetworkConnection', head: [], body: [] },
|
|
@@ -147,8 +147,8 @@ const DefaultConf = /**/ {
|
|
|
147
147
|
apis: ['default', 'core', 'user', 'test', 'file'],
|
|
148
148
|
origins: [],
|
|
149
149
|
minifyBuild: false,
|
|
150
|
-
iconsBuild:
|
|
151
|
-
liteBuild:
|
|
150
|
+
iconsBuild: false,
|
|
151
|
+
liteBuild: true,
|
|
152
152
|
docsBuild: false,
|
|
153
153
|
offlineBuild: false,
|
|
154
154
|
ws: 'core',
|
package/manifests/deployment/{dd-template-development → dd-default-development}/deployment.yaml
RENAMED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
apiVersion: apps/v1
|
|
3
3
|
kind: Deployment
|
|
4
4
|
metadata:
|
|
5
|
-
name: dd-
|
|
5
|
+
name: dd-default-development-blue
|
|
6
6
|
labels:
|
|
7
|
-
app: dd-
|
|
7
|
+
app: dd-default-development-blue
|
|
8
8
|
spec:
|
|
9
9
|
replicas: 1
|
|
10
10
|
selector:
|
|
11
11
|
matchLabels:
|
|
12
|
-
app: dd-
|
|
12
|
+
app: dd-default-development-blue
|
|
13
13
|
template:
|
|
14
14
|
metadata:
|
|
15
15
|
labels:
|
|
16
|
-
app: dd-
|
|
16
|
+
app: dd-default-development-blue
|
|
17
17
|
spec:
|
|
18
18
|
containers:
|
|
19
|
-
- name: dd-
|
|
20
|
-
image: localhost/rockylinux9-underpost:v2.8.
|
|
19
|
+
- name: dd-default-development-blue
|
|
20
|
+
image: localhost/rockylinux9-underpost:v2.8.87
|
|
21
21
|
# resources:
|
|
22
22
|
# requests:
|
|
23
23
|
# memory: "124Ki"
|
|
@@ -40,10 +40,10 @@ spec:
|
|
|
40
40
|
apiVersion: v1
|
|
41
41
|
kind: Service
|
|
42
42
|
metadata:
|
|
43
|
-
name: dd-
|
|
43
|
+
name: dd-default-development-blue-service
|
|
44
44
|
spec:
|
|
45
45
|
selector:
|
|
46
|
-
app: dd-
|
|
46
|
+
app: dd-default-development-blue
|
|
47
47
|
ports:
|
|
48
48
|
- name: 'tcp-4001'
|
|
49
49
|
protocol: TCP
|
|
@@ -85,22 +85,22 @@ spec:
|
|
|
85
85
|
apiVersion: apps/v1
|
|
86
86
|
kind: Deployment
|
|
87
87
|
metadata:
|
|
88
|
-
name: dd-
|
|
88
|
+
name: dd-default-development-green
|
|
89
89
|
labels:
|
|
90
|
-
app: dd-
|
|
90
|
+
app: dd-default-development-green
|
|
91
91
|
spec:
|
|
92
92
|
replicas: 1
|
|
93
93
|
selector:
|
|
94
94
|
matchLabels:
|
|
95
|
-
app: dd-
|
|
95
|
+
app: dd-default-development-green
|
|
96
96
|
template:
|
|
97
97
|
metadata:
|
|
98
98
|
labels:
|
|
99
|
-
app: dd-
|
|
99
|
+
app: dd-default-development-green
|
|
100
100
|
spec:
|
|
101
101
|
containers:
|
|
102
|
-
- name: dd-
|
|
103
|
-
image: localhost/rockylinux9-underpost:v2.8.
|
|
102
|
+
- name: dd-default-development-green
|
|
103
|
+
image: localhost/rockylinux9-underpost:v2.8.87
|
|
104
104
|
# resources:
|
|
105
105
|
# requests:
|
|
106
106
|
# memory: "124Ki"
|
|
@@ -124,10 +124,10 @@ spec:
|
|
|
124
124
|
apiVersion: v1
|
|
125
125
|
kind: Service
|
|
126
126
|
metadata:
|
|
127
|
-
name: dd-
|
|
127
|
+
name: dd-default-development-green-service
|
|
128
128
|
spec:
|
|
129
129
|
selector:
|
|
130
|
-
app: dd-
|
|
130
|
+
app: dd-default-development-green
|
|
131
131
|
ports:
|
|
132
132
|
- name: 'tcp-4001'
|
|
133
133
|
protocol: TCP
|
|
@@ -16,7 +16,7 @@ spec:
|
|
|
16
16
|
- prefix: /
|
|
17
17
|
enableWebsockets: true
|
|
18
18
|
services:
|
|
19
|
-
- name: dd-
|
|
19
|
+
- name: dd-default-development-blue-service
|
|
20
20
|
port: 4001
|
|
21
21
|
weight: 100
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ spec:
|
|
|
24
24
|
- prefix: /peer
|
|
25
25
|
enableWebsockets: true
|
|
26
26
|
services:
|
|
27
|
-
- name: dd-
|
|
27
|
+
- name: dd-default-development-blue-service
|
|
28
28
|
port: 4002
|
|
29
29
|
weight: 100
|
|
30
30
|
|
|
@@ -41,6 +41,6 @@ spec:
|
|
|
41
41
|
- prefix: /
|
|
42
42
|
enableWebsockets: true
|
|
43
43
|
services:
|
|
44
|
-
- name: dd-
|
|
44
|
+
- name: dd-default-development-blue-service
|
|
45
45
|
port: 4003
|
|
46
46
|
weight: 100
|
|
@@ -20,16 +20,16 @@ spec:
|
|
|
20
20
|
ports:
|
|
21
21
|
- containerPort: 8081
|
|
22
22
|
env:
|
|
23
|
-
- name: ME_CONFIG_MONGODB_ADMINUSERNAME
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- name: ME_CONFIG_MONGODB_ADMINPASSWORD
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
# - name: ME_CONFIG_MONGODB_ADMINUSERNAME
|
|
24
|
+
# valueFrom:
|
|
25
|
+
# secretKeyRef:
|
|
26
|
+
# name: mongodb-secret
|
|
27
|
+
# key: username
|
|
28
|
+
# - name: ME_CONFIG_MONGODB_ADMINPASSWORD
|
|
29
|
+
# valueFrom:
|
|
30
|
+
# secretKeyRef:
|
|
31
|
+
# name: mongodb-secret
|
|
32
|
+
# key: password
|
|
33
33
|
- name: ME_CONFIG_BASICAUTH_USERNAME
|
|
34
34
|
valueFrom:
|
|
35
35
|
secretKeyRef:
|
|
@@ -42,8 +42,8 @@ spec:
|
|
|
42
42
|
key: password
|
|
43
43
|
- name: ME_CONFIG_MONGODB_SERVER
|
|
44
44
|
value: 'mongodb-0.mongodb-service'
|
|
45
|
-
- name: ME_CONFIG_MONGODB_ENABLE_ADMIN
|
|
46
|
-
|
|
45
|
+
# - name: ME_CONFIG_MONGODB_ENABLE_ADMIN
|
|
46
|
+
# value: 'true'
|
|
47
47
|
- name: ME_CONFIG_MONGODB_PORT
|
|
48
48
|
value: '27017'
|
|
49
49
|
---
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
apiVersion: apps/v1
|
|
3
|
+
kind: Deployment
|
|
4
|
+
metadata:
|
|
5
|
+
labels:
|
|
6
|
+
app: grafana
|
|
7
|
+
name: grafana
|
|
8
|
+
spec:
|
|
9
|
+
selector:
|
|
10
|
+
matchLabels:
|
|
11
|
+
app: grafana
|
|
12
|
+
template:
|
|
13
|
+
metadata:
|
|
14
|
+
labels:
|
|
15
|
+
app: grafana
|
|
16
|
+
spec:
|
|
17
|
+
securityContext:
|
|
18
|
+
fsGroup: 472
|
|
19
|
+
supplementalGroups:
|
|
20
|
+
- 0
|
|
21
|
+
containers:
|
|
22
|
+
- name: grafana
|
|
23
|
+
image: grafana/grafana:latest
|
|
24
|
+
imagePullPolicy: IfNotPresent
|
|
25
|
+
ports:
|
|
26
|
+
- containerPort: 3000
|
|
27
|
+
name: http-grafana
|
|
28
|
+
protocol: TCP
|
|
29
|
+
readinessProbe:
|
|
30
|
+
failureThreshold: 3
|
|
31
|
+
httpGet:
|
|
32
|
+
path: /robots.txt
|
|
33
|
+
port: 3000
|
|
34
|
+
scheme: HTTP
|
|
35
|
+
initialDelaySeconds: 10
|
|
36
|
+
periodSeconds: 30
|
|
37
|
+
successThreshold: 1
|
|
38
|
+
timeoutSeconds: 2
|
|
39
|
+
livenessProbe:
|
|
40
|
+
failureThreshold: 3
|
|
41
|
+
initialDelaySeconds: 30
|
|
42
|
+
periodSeconds: 10
|
|
43
|
+
successThreshold: 1
|
|
44
|
+
tcpSocket:
|
|
45
|
+
port: 3000
|
|
46
|
+
timeoutSeconds: 1
|
|
47
|
+
resources:
|
|
48
|
+
requests:
|
|
49
|
+
cpu: 250m
|
|
50
|
+
memory: 750Mi
|
|
51
|
+
volumeMounts:
|
|
52
|
+
- mountPath: /var/lib/grafana
|
|
53
|
+
name: grafana-pv
|
|
54
|
+
volumes:
|
|
55
|
+
- name: grafana-pv
|
|
56
|
+
persistentVolumeClaim:
|
|
57
|
+
claimName: grafana-pvc
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
sudo dnf install -y neovim
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
sudo rm -rf ~/.config/nvim
|
|
8
|
+
sudo rm -rf ~/.local/share/nvim
|
|
9
|
+
|
|
10
|
+
mkdir -p ~/.config/nvim
|
|
11
|
+
mkdir -p ~/.local/share/nvim/site/autoload
|
|
12
|
+
|
|
13
|
+
# Install vim-plug for Neovim
|
|
14
|
+
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
|
|
15
|
+
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
16
|
+
|
|
17
|
+
# Create an init.vim with nvim-tree.lua + web-devicons + gruvbox (theme)
|
|
18
|
+
cat > ~/.config/nvim/init.vim <<'EOF'
|
|
19
|
+
" Minimal init.vim to use nvim-tree.lua + gruvbox theme via vim-plug
|
|
20
|
+
|
|
21
|
+
" --- vim-plug manager
|
|
22
|
+
call plug#begin('~/.local/share/nvim/plugged')
|
|
23
|
+
|
|
24
|
+
" file explorer (nvim-tree)
|
|
25
|
+
Plug 'nvim-tree/nvim-tree.lua'
|
|
26
|
+
Plug 'nvim-tree/nvim-web-devicons' " optional: file icons
|
|
27
|
+
|
|
28
|
+
" colorscheme
|
|
29
|
+
Plug 'morhetz/gruvbox'
|
|
30
|
+
|
|
31
|
+
" sensible defaults, optional
|
|
32
|
+
Plug 'tpope/vim-sensible'
|
|
33
|
+
|
|
34
|
+
call plug#end()
|
|
35
|
+
|
|
36
|
+
" --- UI settings
|
|
37
|
+
syntax on
|
|
38
|
+
filetype plugin indent on
|
|
39
|
+
set number
|
|
40
|
+
set relativenumber
|
|
41
|
+
if has('termguicolors')
|
|
42
|
+
set termguicolors
|
|
43
|
+
endif
|
|
44
|
+
set background=dark
|
|
45
|
+
|
|
46
|
+
" gruvbox options (optional)
|
|
47
|
+
let g:gruvbox_contrast_dark = 'soft'
|
|
48
|
+
colorscheme gruvbox
|
|
49
|
+
|
|
50
|
+
" --- nvim-tree configuration (Lua block)
|
|
51
|
+
lua << 'LUA'
|
|
52
|
+
-- safe require
|
|
53
|
+
local ok, tree = pcall(require, "nvim-tree")
|
|
54
|
+
if not ok then
|
|
55
|
+
return
|
|
56
|
+
end
|
|
57
|
+
tree.setup{
|
|
58
|
+
view = {
|
|
59
|
+
width = 30,
|
|
60
|
+
side = "left",
|
|
61
|
+
preserve_window_proportions = true,
|
|
62
|
+
},
|
|
63
|
+
renderer = {
|
|
64
|
+
indent_markers = { enable = true },
|
|
65
|
+
},
|
|
66
|
+
actions = {
|
|
67
|
+
open_file = {
|
|
68
|
+
quit_on_open = false,
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
LUA
|
|
73
|
+
|
|
74
|
+
" --- mappings: Ctrl-n toggles nvim-tree
|
|
75
|
+
nnoremap <C-n> :NvimTreeToggle<CR>
|
|
76
|
+
|
|
77
|
+
" Open nvim-tree on startup when opening nvim with no file args
|
|
78
|
+
autocmd StdinReadPre * let s:std_in=1
|
|
79
|
+
autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NvimTreeToggle | wincmd p | endif
|
|
80
|
+
EOF
|
|
81
|
+
|
|
82
|
+
# Fix permissions in case something was left owned by root (happens if you used sudo on these paths before)
|
|
83
|
+
sudo chown -R "$USER":"$USER" ~/.config/nvim ~/.local/share/nvim 2>/dev/null || true
|
|
84
|
+
|
|
85
|
+
# Install plugins automatically (non-interactive)
|
|
86
|
+
nvim +PlugInstall +qall
|
|
87
|
+
|
|
88
|
+
echo
|
|
89
|
+
echo "Done. Plugins installed."
|
|
90
|
+
echo "Run 'nvim' and press Ctrl-n to toggle the file tree."
|
|
91
|
+
echo "If colorscheme is not correct, ensure your terminal supports truecolor and TERM is xterm-256color."
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
REMOTE_USER=$(node bin config get --plain DEFAULT_SSH_USER)
|
|
5
|
+
REMOTE_HOST=$(node bin config get --plain DEFAULT_SSH_HOST)
|
|
6
|
+
SSH_KEY=$(node bin config get --plain DEFAULT_SSH_KEY_PATH)
|
|
7
|
+
|
|
8
|
+
chmod 600 "$SSH_KEY"
|
|
9
|
+
|
|
10
|
+
ssh -i "$SSH_KEY" -o BatchMode=yes "${REMOTE_USER}@${REMOTE_HOST}" sh <<EOF
|
|
11
|
+
cd /home/dd/engine
|
|
12
|
+
node bin deploy dd production --info-traffic
|
|
13
|
+
kubectl get pods -A
|
|
14
|
+
EOF
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
apiVersion: v1
|
|
3
|
+
kind: ConfigMap
|
|
4
|
+
metadata:
|
|
5
|
+
name: prometheus-config
|
|
6
|
+
labels:
|
|
7
|
+
app: prometheus
|
|
8
|
+
data:
|
|
9
|
+
prometheus.yml: |
|
|
10
|
+
global:
|
|
11
|
+
scrape_interval: 30s
|
|
12
|
+
evaluation_interval: 30s
|
|
13
|
+
|
|
14
|
+
scrape_configs:
|
|
15
|
+
- job_name: 'scraper'
|
|
16
|
+
metrics_path: /metrics
|
|
17
|
+
scheme: https
|
|
18
|
+
static_configs:
|
|
19
|
+
- targets: []
|
|
20
|
+
# tls_config:
|
|
21
|
+
# insecure_skip_verify: true
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
apiVersion: apps/v1
|
|
25
|
+
kind: Deployment
|
|
26
|
+
metadata:
|
|
27
|
+
name: prometheus
|
|
28
|
+
labels:
|
|
29
|
+
app: prometheus
|
|
30
|
+
spec:
|
|
31
|
+
replicas: 1
|
|
32
|
+
selector:
|
|
33
|
+
matchLabels:
|
|
34
|
+
app: prometheus
|
|
35
|
+
template:
|
|
36
|
+
metadata:
|
|
37
|
+
labels:
|
|
38
|
+
app: prometheus
|
|
39
|
+
spec:
|
|
40
|
+
containers:
|
|
41
|
+
- name: prometheus
|
|
42
|
+
image: prom/prometheus:latest
|
|
43
|
+
args:
|
|
44
|
+
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
45
|
+
- '--storage.tsdb.path=/prometheus'
|
|
46
|
+
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
|
|
47
|
+
- '--web.console.templates=/usr/share/prometheus/consoles'
|
|
48
|
+
ports:
|
|
49
|
+
- containerPort: 9090
|
|
50
|
+
name: web
|
|
51
|
+
volumeMounts:
|
|
52
|
+
- name: prometheus-config
|
|
53
|
+
mountPath: /etc/prometheus/
|
|
54
|
+
- name: prometheus-data
|
|
55
|
+
mountPath: /prometheus
|
|
56
|
+
resources:
|
|
57
|
+
requests:
|
|
58
|
+
memory: '200Mi'
|
|
59
|
+
cpu: '100m'
|
|
60
|
+
volumes:
|
|
61
|
+
- name: prometheus-config
|
|
62
|
+
configMap:
|
|
63
|
+
name: prometheus-config
|
|
64
|
+
- name: prometheus-data
|
|
65
|
+
emptyDir: {}
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
apiVersion: v1
|
|
69
|
+
kind: Service
|
|
70
|
+
metadata:
|
|
71
|
+
name: prometheus
|
|
72
|
+
labels:
|
|
73
|
+
app: prometheus
|
|
74
|
+
spec:
|
|
75
|
+
ports:
|
|
76
|
+
- port: 9090
|
|
77
|
+
targetPort: 9090
|
|
78
|
+
protocol: TCP
|
|
79
|
+
name: web
|
|
80
|
+
selector:
|
|
81
|
+
app: prometheus
|
|
82
|
+
type: ClusterIP
|
package/package.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"type": "module",
|
|
3
3
|
"main": "src/index.js",
|
|
4
4
|
"name": "underpost",
|
|
5
|
-
"version": "2.8.
|
|
5
|
+
"version": "2.8.87",
|
|
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",
|
|
9
9
|
"build": "node bin/deploy build-full-client",
|
|
10
10
|
"test": "env-cmd -f .env.test c8 mocha",
|
|
11
|
-
"pm2": "env-cmd -f .env.production pm2 start src/server.js --node-args=\"--max-old-space-size=8192\" --name engine",
|
|
12
|
-
"dev": "env-cmd -f .env.development
|
|
11
|
+
"pm2": "env-cmd -f .env.production pm2 start src/server.js --node-args=\"--max-old-space-size=8192\" --name engine -- dd-default",
|
|
12
|
+
"dev": "env-cmd -f .env.development nodemon src/server",
|
|
13
13
|
"dev-img": "env-cmd -f .env.development node src/server",
|
|
14
14
|
"prod-img": "env-cmd -f .env.production node src/server",
|
|
15
15
|
"monitor": "pm2 start src/monitor.js --name monitor -- dd production",
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"install-test": "npm install -g mocha && npm install -g c8 && npm install -g nyc && npm install -g coveralls",
|
|
22
22
|
"install-underpost": "cp -a $(npm root -g)/underpost/node_modules ./node_modules && npm install --only=dev --ignore-scripts",
|
|
23
23
|
"install": "npm run install-global && npm run install-test",
|
|
24
|
-
"docker:start": "docker-compose up",
|
|
25
24
|
"prettier": "prettier --write .",
|
|
26
25
|
"fix": "npm audit fix --force && npm audit",
|
|
27
26
|
"changelog": "auto-changelog"
|
|
@@ -59,11 +58,8 @@
|
|
|
59
58
|
"axios": "^1.5.1",
|
|
60
59
|
"chai": "^5.1.0",
|
|
61
60
|
"clean-jsdoc-theme": "^4.3.0",
|
|
62
|
-
"cli-progress": "^3.12.0",
|
|
63
|
-
"cli-spinners": "^3.0.0",
|
|
64
61
|
"clipboardy": "^4.0.0",
|
|
65
62
|
"cloudinary": "^2.5.1",
|
|
66
|
-
"color": "^4.2.3",
|
|
67
63
|
"colors": "^1.4.0",
|
|
68
64
|
"commander": "^12.1.0",
|
|
69
65
|
"compression": "^1.7.4",
|
|
@@ -75,7 +71,6 @@
|
|
|
75
71
|
"express": "^4.18.2",
|
|
76
72
|
"express-fileupload": "^1.4.3",
|
|
77
73
|
"favicons": "^7.2.0",
|
|
78
|
-
"font-awesome-assets": "^0.0.9",
|
|
79
74
|
"fs-extra": "^11.1.1",
|
|
80
75
|
"fullcalendar": "^6.1.15",
|
|
81
76
|
"html-minifier-terser": "^7.2.0",
|
|
@@ -83,11 +78,9 @@
|
|
|
83
78
|
"ignore-walk": "^6.0.4",
|
|
84
79
|
"iovalkey": "^0.2.1",
|
|
85
80
|
"jimp": "^0.22.12",
|
|
86
|
-
"joystick-controller": "^1.0.15",
|
|
87
81
|
"json-colorizer": "^2.2.2",
|
|
88
82
|
"jsonwebtoken": "^9.0.2",
|
|
89
83
|
"keyword-extractor": "^0.0.28",
|
|
90
|
-
"log-update": "^6.0.0",
|
|
91
84
|
"mariadb": "^3.2.2",
|
|
92
85
|
"marked": "^12.0.2",
|
|
93
86
|
"mocha": "^10.8.2",
|
|
@@ -98,7 +91,6 @@
|
|
|
98
91
|
"pathfinding": "^0.4.18",
|
|
99
92
|
"peer": "^1.0.2",
|
|
100
93
|
"peerjs": "^1.5.2",
|
|
101
|
-
"pixi.js": "7.4.2",
|
|
102
94
|
"prom-client": "^15.1.2",
|
|
103
95
|
"public-ip": "^6.0.1",
|
|
104
96
|
"read": "^2.1.0",
|
|
@@ -117,7 +109,6 @@
|
|
|
117
109
|
"vanilla-jsoneditor": "^2.3.2",
|
|
118
110
|
"winston": "^3.11.0"
|
|
119
111
|
},
|
|
120
|
-
"devDependencies": {},
|
|
121
112
|
"publishConfig": {
|
|
122
113
|
"provenance": true,
|
|
123
114
|
"access": "public",
|