underpost 2.8.799 → 2.8.812

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/src/index.js CHANGED
@@ -4,6 +4,7 @@
4
4
  * @namespace Underpost
5
5
  */
6
6
 
7
+ import UnderpostBaremetal from './cli/baremetal.js';
7
8
  import UnderpostCluster from './cli/cluster.js';
8
9
  import UnderpostCron from './cli/cron.js';
9
10
  import UnderpostDB from './cli/db.js';
@@ -31,7 +32,7 @@ class Underpost {
31
32
  * @type {String}
32
33
  * @memberof Underpost
33
34
  */
34
- static version = 'v2.8.799';
35
+ static version = 'v2.8.812';
35
36
  /**
36
37
  * Repository cli API
37
38
  * @static
@@ -130,6 +131,13 @@ class Underpost {
130
131
  * @memberof Underpost
131
132
  */
132
133
  static lxd = UnderpostLxd.API;
134
+ /**
135
+ * Baremetal cli API
136
+ * @static
137
+ * @type {UnderpostBaremetal.API}
138
+ * @memberof Underpost
139
+ */
140
+ static baremetal = UnderpostBaremetal.API;
133
141
  }
134
142
 
135
143
  const up = Underpost;
@@ -1,65 +1,59 @@
1
- ARG BASE_DEBIAN=buster
2
-
3
- # USER root
4
-
5
- FROM debian:${BASE_DEBIAN}
6
-
7
- ENV DEBIAN_FRONTEND=noninteractive
8
-
9
- # Set root password to root, format is 'user:password'.
10
- RUN echo 'root:root' | chpasswd
11
-
12
- RUN apt-get update --fix-missing
13
- RUN apt-get upgrade -y
14
- # install sudo
15
- RUN apt-get -y install sudo
16
- # net-tools provides netstat commands
17
- RUN apt-get -y install curl net-tools
18
- RUN apt-get -yq install openssh-server supervisor
19
- # Few handy utilities which are nice to have
20
- RUN apt-get -y install nano vim less --no-install-recommends
21
- RUN apt-get clean
22
-
23
- # install ssh
24
- RUN mkdir -p /var/run/sshd
25
- # Allow root login via password
26
- RUN sed -ri 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
27
-
28
- # install open ssl git and others tools
29
- RUN apt-get install -yq --no-install-recommends libssl-dev curl wget git gnupg
30
-
31
- # install lampp
1
+ FROM rockylinux:9
2
+
3
+ RUN dnf install -y --allowerasing bzip2
4
+
5
+ RUN dnf update -y
6
+ RUN dnf install -y epel-release
7
+ RUN dnf install -y --allowerasing sudo
8
+ RUN dnf install -y --allowerasing curl
9
+ RUN dnf install -y --allowerasing net-tools
10
+ RUN dnf install -y --allowerasing openssh-server
11
+ RUN dnf install -y --allowerasing nano
12
+ RUN dnf install -y --allowerasing vim-enhanced
13
+ RUN dnf install -y --allowerasing less
14
+ RUN dnf install -y --allowerasing openssl-devel
15
+ RUN dnf install -y --allowerasing wget
16
+ RUN dnf install -y --allowerasing git
17
+ RUN dnf install -y --allowerasing gnupg2
18
+ RUN dnf clean all
19
+
20
+ # Install LAMPP (XAMPP)
21
+ # Download the XAMPP installer for Linux
32
22
  RUN curl -Lo xampp-linux-installer.run https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/7.4.33/xampp-linux-x64-7.4.33-0-installer.run?from_af=true
33
23
  RUN chmod +x xampp-linux-installer.run
34
- RUN bash -c './xampp-linux-installer.run'
24
+ # Run the XAMPP installer in silent mode
25
+ RUN bash -c './xampp-linux-installer.run --mode unattended'
26
+ # Create a symbolic link for easy access to lampp command
35
27
  RUN ln -sf /opt/lampp/lampp /usr/bin/lampp
36
- # Enable XAMPP web interface(remove security checks)
37
- RUN sed -i.bak s'/Require local/Require all granted/g' /opt/lampp/etc/extra/httpd-xampp.conf
28
+
29
+ # Configure XAMPP
30
+ # Enable XAMPP web interface (remove security checks)
31
+ RUN sed -i.bak 's/Require local/Require all granted/g' /opt/lampp/etc/extra/httpd-xampp.conf
38
32
  # Enable error display in php
39
- RUN sed -i.bak s'/display_errors=Off/display_errors=On/g' /opt/lampp/etc/php.ini
40
- # Enable includes of several configuration files
41
- RUN mkdir /opt/lampp/apache2/conf.d
33
+ RUN sed -i.bak 's/display_errors=Off/display_errors=On/g' /opt/lampp/etc/php.ini
34
+ # Enable includes of several configuration files for Apache
35
+ RUN mkdir -p /opt/lampp/apache2/conf.d
42
36
  RUN echo "IncludeOptional /opt/lampp/apache2/conf.d/*.conf" >>/opt/lampp/etc/httpd.conf
43
- # Create a /www folder and a symbolic link to it in /opt/lampp/htdocs. It'll be accessible via http://localhost:[port]/www/
44
- # This is convenient because it doesn't interfere with xampp, phpmyadmin or other tools in /opt/lampp/htdocs
45
- # /opt/lampp/etc/httpd.conf
37
+ # Create a /www folder and a symbolic link to it in /opt/lampp/htdocs
38
+ # This is convenient because it doesn't interfere with xampp, phpmyadmin or other tools
46
39
  RUN mkdir /www
47
40
  RUN ln -s /www /opt/lampp/htdocs
48
41
 
49
- # install nodejs https://github.com/nodesource/distributions/blob/master/README.md#deb
50
- RUN curl -fsSL https://deb.nodesource.com/setup_23.x | bash -
51
- RUN apt-get install -y nodejs build-essential
42
+ # Install Node.js
43
+ RUN curl -fsSL https://rpm.nodesource.com/setup_23.x | bash -
44
+ RUN dnf install nodejs -y
45
+ RUN dnf clean all
46
+
47
+ # Verify Node.js and npm versions
52
48
  RUN node --version
53
49
  RUN npm --version
54
50
 
51
+ # Set working directory
55
52
  WORKDIR /home/dd
56
53
 
54
+ # Expose necessary ports
57
55
  EXPOSE 22
58
-
59
56
  EXPOSE 80
60
-
61
57
  EXPOSE 443
62
-
63
58
  EXPOSE 3000-3100
64
-
65
59
  EXPOSE 4000-4100
@@ -1171,6 +1171,63 @@ const writeEnv = (envPath, envObj) =>
1171
1171
  'utf8',
1172
1172
  );
1173
1173
 
1174
+ const buildCliDoc = (program) => {
1175
+ let md = shellExec(`node bin help`, { silent: true, stdout: true }).split('Options:');
1176
+ const baseOptions =
1177
+ `## ${md[0].split(`\n`)[2]}
1178
+
1179
+ ### Usage: ` +
1180
+ '`' +
1181
+ md[0].split(`\n`)[0].split('Usage: ')[1] +
1182
+ '`' +
1183
+ `
1184
+ ` +
1185
+ '```\n Options:' +
1186
+ md[1] +
1187
+ ' \n```';
1188
+ md =
1189
+ baseOptions +
1190
+ `
1191
+
1192
+ ## Commands:
1193
+ `;
1194
+ program.commands.map((o) => {
1195
+ md +=
1196
+ `
1197
+
1198
+ ` +
1199
+ '### `' +
1200
+ o._name +
1201
+ '` :' +
1202
+ `
1203
+ ` +
1204
+ '```\n ' +
1205
+ shellExec(`node bin help ${o._name}`, { silent: true, stdout: true }) +
1206
+ ' \n```' +
1207
+ `
1208
+ `;
1209
+ });
1210
+ fs.writeFileSync(`./src/client/public/nexodev/docs/references/Command Line Interface.md`, md, 'utf8');
1211
+ fs.writeFileSync(`./cli.md`, md, 'utf8');
1212
+ const readmeSplit = `pwa-microservices-template</a>`;
1213
+ const readme = fs.readFileSync(`./README.md`, 'utf8').split(readmeSplit);
1214
+ fs.writeFileSync(
1215
+ './README.md',
1216
+ readme[0] +
1217
+ readmeSplit +
1218
+ `
1219
+
1220
+ ` +
1221
+ baseOptions +
1222
+ `
1223
+
1224
+ <a target="_top" href="https://github.com/underpostnet/pwa-microservices-template/blob/master/cli.md">See complete CLI Docs here.</a>
1225
+
1226
+ `,
1227
+ 'utf8',
1228
+ );
1229
+ };
1230
+
1174
1231
  export {
1175
1232
  Cmd,
1176
1233
  Config,
@@ -1214,4 +1271,5 @@ export {
1214
1271
  deployRangePortFactory,
1215
1272
  awaitDeployMonitor,
1216
1273
  rebuildConfFactory,
1274
+ buildCliDoc,
1217
1275
  };
@@ -1,5 +0,0 @@
1
- [program:openssh-server]
2
- command=/usr/sbin/sshd -D
3
- numprocs=1
4
- autostart=true
5
- autorestart=true