@hideandseeklab/aoox 0.1.0-alpha.1 → 0.1.0-alpha.2
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 +21 -19
- package/assets/install/docker-compose.dist.yml +5 -0
- package/dist/commands/domain/set.js +10 -1
- package/dist/commands/install.d.ts +1 -0
- package/dist/commands/install.js +5 -0
- package/dist/lib/install-env.d.ts +2 -0
- package/dist/lib/install-env.js +1 -1
- package/oclif.manifest.json +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g @hideandseeklab/aoox
|
|
|
21
21
|
$ aoox COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ aoox (--version)
|
|
24
|
-
@hideandseeklab/aoox/0.1.0-alpha.
|
|
24
|
+
@hideandseeklab/aoox/0.1.0-alpha.2 linux-x64 node-v24.21.0
|
|
25
25
|
$ aoox --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ aoox COMMAND
|
|
@@ -102,7 +102,7 @@ EXAMPLES
|
|
|
102
102
|
$ aoox deploy --tag v1.2.3
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
_See code: [src/commands/deploy.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
105
|
+
_See code: [src/commands/deploy.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/deploy.ts)_
|
|
106
106
|
|
|
107
107
|
## `aoox domain set`
|
|
108
108
|
|
|
@@ -128,7 +128,7 @@ EXAMPLES
|
|
|
128
128
|
$ aoox domain set --web panel.example.com --api api.example.com --acme-email you@example.com
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
_See code: [src/commands/domain/set.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
131
|
+
_See code: [src/commands/domain/set.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/domain/set.ts)_
|
|
132
132
|
|
|
133
133
|
## `aoox help [COMMAND]`
|
|
134
134
|
|
|
@@ -157,18 +157,20 @@ Pasang aoox (postgres + api + web) di VPS baru lewat Docker Compose
|
|
|
157
157
|
```
|
|
158
158
|
USAGE
|
|
159
159
|
$ aoox install [--acme-email <value>] [--admin-name <value> --admin-email <value>] [--admin-password
|
|
160
|
-
<value> ] [--api-domain <value> --web-domain <value>] [--dir <value>] [--force] [-y]
|
|
160
|
+
<value> ] [--api-domain <value> --web-domain <value>] [--dir <value>] [--force] [--terminal-ssh-user <value>] [-y]
|
|
161
161
|
|
|
162
162
|
FLAGS
|
|
163
|
-
-y, --yes
|
|
164
|
-
--acme-email=<value>
|
|
165
|
-
--admin-email=<value>
|
|
166
|
-
--admin-name=<value>
|
|
167
|
-
--admin-password=<value>
|
|
168
|
-
--api-domain=<value>
|
|
169
|
-
--dir=<value>
|
|
170
|
-
--force
|
|
171
|
-
--
|
|
163
|
+
-y, --yes Jangan tanya konfirmasi apa pun
|
|
164
|
+
--acme-email=<value> Wajib bersama --web-domain/--api-domain (Let’s Encrypt)
|
|
165
|
+
--admin-email=<value> Buat owner pertama tanpa lewat /setup di browser
|
|
166
|
+
--admin-name=<value> Nama owner pertama
|
|
167
|
+
--admin-password=<value> Password owner pertama (min. 8 karakter)
|
|
168
|
+
--api-domain=<value> Domain untuk API, lewat proxy bawaan
|
|
169
|
+
--dir=<value> [default: /opt/aoox] Folder instalasi
|
|
170
|
+
--force Timpa instalasi yang sudah ada di --dir
|
|
171
|
+
--terminal-ssh-user=<value> [default: root] User SSH untuk fitur Terminal web masuk ke host ini (instalasi
|
|
172
|
+
berjalan sebagai root)
|
|
173
|
+
--web-domain=<value> Domain untuk panel web, lewat proxy bawaan
|
|
172
174
|
|
|
173
175
|
DESCRIPTION
|
|
174
176
|
Pasang aoox (postgres + api + web) di VPS baru lewat Docker Compose
|
|
@@ -179,7 +181,7 @@ EXAMPLES
|
|
|
179
181
|
sudo aoox install --web-domain panel.example.com --api-domain api.panel.example.com --acme-email me@example.com
|
|
180
182
|
```
|
|
181
183
|
|
|
182
|
-
_See code: [src/commands/install.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
184
|
+
_See code: [src/commands/install.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/install.ts)_
|
|
183
185
|
|
|
184
186
|
## `aoox link`
|
|
185
187
|
|
|
@@ -204,7 +206,7 @@ EXAMPLES
|
|
|
204
206
|
$ aoox link --project <id> --app <id>
|
|
205
207
|
```
|
|
206
208
|
|
|
207
|
-
_See code: [src/commands/link.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
209
|
+
_See code: [src/commands/link.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/link.ts)_
|
|
208
210
|
|
|
209
211
|
## `aoox login`
|
|
210
212
|
|
|
@@ -227,7 +229,7 @@ EXAMPLES
|
|
|
227
229
|
$ aoox login --url https://panel.example.com --token aoox_xxx
|
|
228
230
|
```
|
|
229
231
|
|
|
230
|
-
_See code: [src/commands/login.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
232
|
+
_See code: [src/commands/login.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/login.ts)_
|
|
231
233
|
|
|
232
234
|
## `aoox plugins`
|
|
233
235
|
|
|
@@ -542,7 +544,7 @@ EXAMPLES
|
|
|
542
544
|
$ aoox registry domain --clear
|
|
543
545
|
```
|
|
544
546
|
|
|
545
|
-
_See code: [src/commands/registry/domain.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
547
|
+
_See code: [src/commands/registry/domain.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/registry/domain.ts)_
|
|
546
548
|
|
|
547
549
|
## `aoox update`
|
|
548
550
|
|
|
@@ -566,7 +568,7 @@ EXAMPLES
|
|
|
566
568
|
$ aoox update --apply
|
|
567
569
|
```
|
|
568
570
|
|
|
569
|
-
_See code: [src/commands/update.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
571
|
+
_See code: [src/commands/update.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/update.ts)_
|
|
570
572
|
|
|
571
573
|
## `aoox whoami`
|
|
572
574
|
|
|
@@ -592,7 +594,7 @@ EXAMPLES
|
|
|
592
594
|
$ aoox whoami --json
|
|
593
595
|
```
|
|
594
596
|
|
|
595
|
-
_See code: [src/commands/whoami.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
597
|
+
_See code: [src/commands/whoami.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/whoami.ts)_
|
|
596
598
|
<!-- commandsstop -->
|
|
597
599
|
|
|
598
600
|
## Versioning
|
|
@@ -67,6 +67,11 @@ services:
|
|
|
67
67
|
JWT_SECRET: ${JWT_SECRET:?set JWT_SECRET in .env.dist (openssl rand -hex 32)}
|
|
68
68
|
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-7d}
|
|
69
69
|
WEB_ORIGIN: ${WEB_ORIGIN:-http://localhost:3000}
|
|
70
|
+
# Externally reachable URL of this API — used to build webhook URLs shown
|
|
71
|
+
# in the dashboard (get-webhook, compose-webhook) and the panel-domain
|
|
72
|
+
# status card. Must match what web gets below, or those keep showing
|
|
73
|
+
# localhost even after a custom API domain is set.
|
|
74
|
+
PUBLIC_API_URL: ${PUBLIC_API_URL:-http://localhost:3001}
|
|
70
75
|
ADMIN_EMAIL: ${ADMIN_EMAIL:-}
|
|
71
76
|
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-}
|
|
72
77
|
ADMIN_NAME: ${ADMIN_NAME:-}
|
|
@@ -32,8 +32,9 @@ export default class DomainSet extends Command {
|
|
|
32
32
|
}
|
|
33
33
|
throw error;
|
|
34
34
|
}
|
|
35
|
+
let result;
|
|
35
36
|
try {
|
|
36
|
-
await api(config, '/instance/domain', {
|
|
37
|
+
result = await api(config, '/instance/domain', {
|
|
37
38
|
body: {
|
|
38
39
|
...(flags['acme-email'] ? { acmeEmail: flags['acme-email'] } : {}),
|
|
39
40
|
apiHost: flags.api,
|
|
@@ -52,5 +53,13 @@ export default class DomainSet extends Command {
|
|
|
52
53
|
}
|
|
53
54
|
this.log(`Domain disimpan: ${flags.web} (dashboard), ${flags.api} (API).`);
|
|
54
55
|
this.log('Panel akan restart beberapa detik untuk menerapkannya — koneksi ke API ini akan sempat terputus.');
|
|
56
|
+
if (result.proxyAutoProvisioned) {
|
|
57
|
+
this.log('');
|
|
58
|
+
this.warn('Reverse proxy belum jalan sebelumnya — sudah diaktifkan otomatis.');
|
|
59
|
+
this.log('Domain baru bisa diakses kalau tiga hal ini juga sudah benar:');
|
|
60
|
+
this.log(` 1. DNS A record ${flags.web} dan ${flags.api} sudah mengarah ke IP server ini.`);
|
|
61
|
+
this.log(' 2. Port 80 dan 443 terbuka untuk publik (firewall OS maupun security group provider VPS).');
|
|
62
|
+
this.log(" 3. Tunggu sampai semenit — sertifikat HTTPS (Let's Encrypt) baru diterbitkan saat domain pertama diakses.");
|
|
63
|
+
}
|
|
55
64
|
}
|
|
56
65
|
}
|
|
@@ -10,6 +10,7 @@ export default class Install extends Command {
|
|
|
10
10
|
'api-domain': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
dir: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
'terminal-ssh-user': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
'web-domain': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
yes: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
16
|
};
|
package/dist/commands/install.js
CHANGED
|
@@ -25,6 +25,10 @@ export default class Install extends Command {
|
|
|
25
25
|
'api-domain': Flags.string({ dependsOn: ['web-domain'], description: 'Domain untuk API, lewat proxy bawaan' }),
|
|
26
26
|
dir: Flags.string({ default: '/opt/aoox', description: 'Folder instalasi' }),
|
|
27
27
|
force: Flags.boolean({ default: false, description: 'Timpa instalasi yang sudah ada di --dir' }),
|
|
28
|
+
'terminal-ssh-user': Flags.string({
|
|
29
|
+
default: 'root',
|
|
30
|
+
description: 'User SSH untuk fitur Terminal web masuk ke host ini (instalasi berjalan sebagai root)',
|
|
31
|
+
}),
|
|
28
32
|
'web-domain': Flags.string({ dependsOn: ['api-domain'], description: 'Domain untuk panel web, lewat proxy bawaan' }),
|
|
29
33
|
yes: Flags.boolean({ char: 'y', default: false, description: 'Jangan tanya konfirmasi apa pun' }),
|
|
30
34
|
};
|
|
@@ -62,6 +66,7 @@ export default class Install extends Command {
|
|
|
62
66
|
postgresPassword: randomBytes(24).toString('hex'),
|
|
63
67
|
publicApiUrl,
|
|
64
68
|
publicIp,
|
|
69
|
+
terminalSshUser: flags['terminal-ssh-user'],
|
|
65
70
|
webDomain: flags['web-domain'],
|
|
66
71
|
webOrigin,
|
|
67
72
|
});
|
|
@@ -13,6 +13,8 @@ export interface InstallEnvOptions {
|
|
|
13
13
|
postgresPassword: string;
|
|
14
14
|
publicApiUrl: string;
|
|
15
15
|
publicIp?: string;
|
|
16
|
+
/** SSH user for the web terminal's host shell. Defaults to `root` — the installer itself requires it. */
|
|
17
|
+
terminalSshUser?: string;
|
|
16
18
|
webDomain?: string;
|
|
17
19
|
webOrigin: string;
|
|
18
20
|
}
|
package/dist/lib/install-env.js
CHANGED
|
@@ -36,7 +36,7 @@ export function buildEnvFile(o) {
|
|
|
36
36
|
'',
|
|
37
37
|
`TERMINAL_SSH_HOST=host.docker.internal`,
|
|
38
38
|
`TERMINAL_SSH_PORT=22`,
|
|
39
|
-
`TERMINAL_SSH_USER
|
|
39
|
+
`TERMINAL_SSH_USER=${o.terminalSshUser ?? 'root'}`,
|
|
40
40
|
`TERMINAL_SSH_PRIVATE_KEY_FILE=`,
|
|
41
41
|
`TERMINAL_SSH_PASSPHRASE=`,
|
|
42
42
|
`TERMINAL_SSH_PASSWORD=`,
|
package/oclif.manifest.json
CHANGED
|
@@ -141,6 +141,14 @@
|
|
|
141
141
|
"allowNo": false,
|
|
142
142
|
"type": "boolean"
|
|
143
143
|
},
|
|
144
|
+
"terminal-ssh-user": {
|
|
145
|
+
"description": "User SSH untuk fitur Terminal web masuk ke host ini (instalasi berjalan sebagai root)",
|
|
146
|
+
"name": "terminal-ssh-user",
|
|
147
|
+
"default": "root",
|
|
148
|
+
"hasDynamicHelp": false,
|
|
149
|
+
"multiple": false,
|
|
150
|
+
"type": "option"
|
|
151
|
+
},
|
|
144
152
|
"web-domain": {
|
|
145
153
|
"dependsOn": [
|
|
146
154
|
"api-domain"
|
|
@@ -498,5 +506,5 @@
|
|
|
498
506
|
]
|
|
499
507
|
}
|
|
500
508
|
},
|
|
501
|
-
"version": "0.1.0-alpha.
|
|
509
|
+
"version": "0.1.0-alpha.2"
|
|
502
510
|
}
|
package/package.json
CHANGED