@hideandseeklab/aoox 0.1.0-alpha.6 → 0.1.0-alpha.8
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 +180 -80
- package/dist/commands/deploy.js +27 -32
- package/dist/commands/domain/set.d.ts +1 -1
- package/dist/commands/domain/set.js +16 -14
- package/dist/commands/install.d.ts +4 -1
- package/dist/commands/install.js +66 -38
- package/dist/commands/link.js +20 -18
- package/dist/commands/login.d.ts +2 -0
- package/dist/commands/login.js +64 -16
- package/dist/commands/registry/build.d.ts +22 -0
- package/dist/commands/registry/build.js +33 -0
- package/dist/commands/registry/domain.js +11 -9
- package/dist/commands/registry/push.d.ts +19 -0
- package/dist/commands/registry/push.js +37 -0
- package/dist/commands/reinstall.js +33 -33
- package/dist/commands/update/panel.d.ts +18 -0
- package/dist/commands/update/panel.js +62 -0
- package/dist/commands/update.d.ts +4 -5
- package/dist/commands/update.js +54 -40
- package/dist/commands/whoami.js +5 -3
- package/dist/help.d.ts +9 -0
- package/dist/help.js +16 -0
- package/dist/lib/api.d.ts +1 -1
- package/dist/lib/api.js +2 -2
- package/dist/lib/config.d.ts +5 -1
- package/dist/lib/config.js +9 -5
- package/dist/lib/connection-summary.d.ts +23 -0
- package/dist/lib/connection-summary.js +70 -0
- package/dist/lib/discovery.d.ts +47 -0
- package/dist/lib/discovery.js +222 -0
- package/dist/lib/docker.js +2 -2
- package/dist/lib/flags.d.ts +7 -0
- package/dist/lib/flags.js +19 -4
- package/dist/lib/image-ref.d.ts +16 -0
- package/dist/lib/image-ref.js +66 -0
- package/dist/lib/install-env.d.ts +20 -1
- package/dist/lib/install-env.js +18 -0
- package/dist/lib/link.js +2 -2
- package/dist/lib/outdated.d.ts +9 -0
- package/dist/lib/outdated.js +23 -0
- package/dist/lib/registry-check.d.ts +35 -0
- package/dist/lib/registry-check.js +102 -0
- package/dist/lib/registry-image-command.d.ts +36 -0
- package/dist/lib/registry-image-command.js +127 -0
- package/dist/lib/registry-select.d.ts +21 -0
- package/dist/lib/registry-select.js +48 -0
- package/dist/lib/reinstall.js +3 -3
- package/dist/lib/self-update.d.ts +30 -0
- package/dist/lib/self-update.js +94 -0
- package/dist/lib/system.js +1 -1
- package/dist/lib/terminal-key.d.ts +74 -0
- package/dist/lib/terminal-key.js +147 -0
- package/dist/lib/types.d.ts +2 -0
- package/dist/lib/version.d.ts +7 -0
- package/dist/lib/version.js +57 -0
- package/oclif.manifest.json +280 -78
- package/package.json +10 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ $ npm install -g @hideandseeklab/aoox
|
|
|
27
27
|
$ aoox COMMAND
|
|
28
28
|
running command...
|
|
29
29
|
$ aoox (--version)
|
|
30
|
-
@hideandseeklab/aoox/0.1.0-alpha.
|
|
30
|
+
@hideandseeklab/aoox/0.1.0-alpha.8 linux-x64 node-v24.21.0
|
|
31
31
|
$ aoox --help [COMMAND]
|
|
32
32
|
USAGE
|
|
33
33
|
$ aoox COMMAND
|
|
@@ -57,14 +57,12 @@ for every environment variable it accepts (pinning a version, a custom install d
|
|
|
57
57
|
|
|
58
58
|
## npm (Windows, Alpine, or if you already have Node.js)
|
|
59
59
|
|
|
60
|
-
`aoox` is still in **alpha** — published to npm under the `alpha` dist-tag, not `latest`
|
|
61
|
-
(the package has never had a stable release, so `npm install -g @hideandseeklab/aoox` without a
|
|
62
|
-
tag will fail to find a version). Install explicitly with this tag:
|
|
63
|
-
|
|
64
60
|
```sh-session
|
|
65
|
-
npm install -g @hideandseeklab/aoox
|
|
61
|
+
npm install -g @hideandseeklab/aoox
|
|
66
62
|
```
|
|
67
63
|
|
|
64
|
+
While the project is in alpha every release is published under both the `latest` and `alpha` tags, so no tag is needed. To update later, run `aoox update` (`aoox update panel` updates the panel).
|
|
65
|
+
|
|
68
66
|
`aoox` is then available globally. This also applies to `aoox install` on a new VPS —
|
|
69
67
|
Node ≥22 must already be installed on that VPS **before** the step above (`aoox install`
|
|
70
68
|
itself needs Node to run, so it cannot install Node for you first) — or use the install script
|
|
@@ -101,14 +99,17 @@ npm link # or: npm install -g .
|
|
|
101
99
|
* [`aoox plugins uninstall [PLUGIN]`](#aoox-plugins-uninstall-plugin)
|
|
102
100
|
* [`aoox plugins unlink [PLUGIN]`](#aoox-plugins-unlink-plugin)
|
|
103
101
|
* [`aoox plugins update`](#aoox-plugins-update)
|
|
102
|
+
* [`aoox registry build IMAGE`](#aoox-registry-build-image)
|
|
104
103
|
* [`aoox registry domain`](#aoox-registry-domain)
|
|
104
|
+
* [`aoox registry push IMAGE`](#aoox-registry-push-image)
|
|
105
105
|
* [`aoox reinstall`](#aoox-reinstall)
|
|
106
106
|
* [`aoox update`](#aoox-update)
|
|
107
|
+
* [`aoox update panel`](#aoox-update-panel)
|
|
107
108
|
* [`aoox whoami`](#aoox-whoami)
|
|
108
109
|
|
|
109
110
|
## `aoox deploy`
|
|
110
111
|
|
|
111
|
-
Build image
|
|
112
|
+
Build a local image, push it to the aoox registry, then deploy (the repo must be linked with `aoox link` first)
|
|
112
113
|
|
|
113
114
|
```
|
|
114
115
|
USAGE
|
|
@@ -116,15 +117,16 @@ USAGE
|
|
|
116
117
|
<value>]
|
|
117
118
|
|
|
118
119
|
FLAGS
|
|
119
|
-
-f, --dockerfile=<value> [default: Dockerfile] Path
|
|
120
|
-
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…);
|
|
121
|
-
-u, --url=<value> [env: AOOX_URL] URL
|
|
120
|
+
-f, --dockerfile=<value> [default: Dockerfile] Path to the Dockerfile
|
|
121
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); defaults to the value from `aoox login`
|
|
122
|
+
-u, --url=<value> [env: AOOX_URL] Dashboard URL (the address you open the dashboard with, e.g.
|
|
123
|
+
https://dashboard.example.com); defaults to the value from `aoox login`
|
|
122
124
|
--context=<value> [default: .] Docker build context
|
|
123
|
-
--registry=<value> ID
|
|
124
|
-
--tag=<value>
|
|
125
|
+
--registry=<value> Registry ID to push to; defaults to the self-hosted registry
|
|
126
|
+
--tag=<value> Image tag; defaults to the git short SHA (+ -dirty)
|
|
125
127
|
|
|
126
128
|
DESCRIPTION
|
|
127
|
-
Build image
|
|
129
|
+
Build a local image, push it to the aoox registry, then deploy (the repo must be linked with `aoox link` first)
|
|
128
130
|
|
|
129
131
|
EXAMPLES
|
|
130
132
|
$ aoox deploy
|
|
@@ -132,25 +134,26 @@ EXAMPLES
|
|
|
132
134
|
$ aoox deploy --tag v1.2.3
|
|
133
135
|
```
|
|
134
136
|
|
|
135
|
-
_See code: [src/commands/deploy.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
137
|
+
_See code: [src/commands/deploy.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.8/src/commands/deploy.ts)_
|
|
136
138
|
|
|
137
139
|
## `aoox domain set`
|
|
138
140
|
|
|
139
|
-
Set domain
|
|
141
|
+
Set a custom domain for the panel itself (not an application) through the running panel API
|
|
140
142
|
|
|
141
143
|
```
|
|
142
144
|
USAGE
|
|
143
145
|
$ aoox domain set --api <value> --web <value> [-t <value>] [-u <value>] [--acme-email <value>]
|
|
144
146
|
|
|
145
147
|
FLAGS
|
|
146
|
-
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…);
|
|
147
|
-
-u, --url=<value> [env: AOOX_URL] URL
|
|
148
|
-
|
|
149
|
-
--
|
|
150
|
-
--
|
|
148
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); defaults to the value from `aoox login`
|
|
149
|
+
-u, --url=<value> [env: AOOX_URL] Dashboard URL (the address you open the dashboard with, e.g.
|
|
150
|
+
https://dashboard.example.com); defaults to the value from `aoox login`
|
|
151
|
+
--acme-email=<value> Email for the Let's Encrypt certificate
|
|
152
|
+
--api=<value> (required) Domain for the panel API
|
|
153
|
+
--web=<value> (required) Domain for the panel dashboard
|
|
151
154
|
|
|
152
155
|
DESCRIPTION
|
|
153
|
-
Set domain
|
|
156
|
+
Set a custom domain for the panel itself (not an application) through the running panel API
|
|
154
157
|
|
|
155
158
|
EXAMPLES
|
|
156
159
|
$ aoox domain set --web panel.example.com --api api.example.com
|
|
@@ -158,7 +161,7 @@ EXAMPLES
|
|
|
158
161
|
$ aoox domain set --web panel.example.com --api api.example.com --acme-email you@example.com
|
|
159
162
|
```
|
|
160
163
|
|
|
161
|
-
_See code: [src/commands/domain/set.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
164
|
+
_See code: [src/commands/domain/set.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.8/src/commands/domain/set.ts)_
|
|
162
165
|
|
|
163
166
|
## `aoox help [COMMAND]`
|
|
164
167
|
|
|
@@ -182,28 +185,31 @@ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.3.0/
|
|
|
182
185
|
|
|
183
186
|
## `aoox install`
|
|
184
187
|
|
|
185
|
-
|
|
188
|
+
Install aoox (postgres + api + web) on a fresh VPS with Docker Compose
|
|
186
189
|
|
|
187
190
|
```
|
|
188
191
|
USAGE
|
|
189
192
|
$ aoox install [--acme-email <value>] [--admin-name <value> --admin-email <value>] [--admin-password
|
|
190
|
-
<value> ] [--api-domain <value> --web-domain <value>] [--dir <value>] [--force] [--terminal-
|
|
193
|
+
<value> ] [--api-domain <value> --web-domain <value>] [--dir <value>] [--force] [--no-terminal-authorize]
|
|
194
|
+
[--terminal-ssh-user <value>] [-y]
|
|
191
195
|
|
|
192
196
|
FLAGS
|
|
193
|
-
-y, --yes
|
|
194
|
-
--acme-email=<value>
|
|
195
|
-
--admin-email=<value>
|
|
196
|
-
--admin-name=<value>
|
|
197
|
-
--admin-password=<value> Password owner
|
|
198
|
-
--api-domain=<value> Domain
|
|
199
|
-
--dir=<value> [default: /opt/aoox]
|
|
200
|
-
--force
|
|
201
|
-
--terminal-
|
|
202
|
-
|
|
203
|
-
--
|
|
197
|
+
-y, --yes Do not ask for any confirmation
|
|
198
|
+
--acme-email=<value> Required with --web-domain/--api-domain (Let’s Encrypt)
|
|
199
|
+
--admin-email=<value> Create the first owner without going through /setup in the browser
|
|
200
|
+
--admin-name=<value> Name of the first owner
|
|
201
|
+
--admin-password=<value> Password of the first owner (min. 8 characters)
|
|
202
|
+
--api-domain=<value> Domain for the API, served through the bundled proxy
|
|
203
|
+
--dir=<value> [default: /opt/aoox] Installation directory
|
|
204
|
+
--force Overwrite an existing installation in --dir
|
|
205
|
+
--no-terminal-authorize Do not create/authorize the web Terminal SSH key automatically (do it in Settings >
|
|
206
|
+
Terminal instead)
|
|
207
|
+
--terminal-ssh-user=<value> SSH user the web Terminal uses to log in to this host (default: the user running
|
|
208
|
+
sudo, or root if there is none)
|
|
209
|
+
--web-domain=<value> Domain for the web panel, served through the bundled proxy
|
|
204
210
|
|
|
205
211
|
DESCRIPTION
|
|
206
|
-
|
|
212
|
+
Install aoox (postgres + api + web) on a fresh VPS with Docker Compose
|
|
207
213
|
|
|
208
214
|
EXAMPLES
|
|
209
215
|
sudo aoox install
|
|
@@ -211,24 +217,25 @@ EXAMPLES
|
|
|
211
217
|
sudo aoox install --web-domain panel.example.com --api-domain api.panel.example.com --acme-email me@example.com
|
|
212
218
|
```
|
|
213
219
|
|
|
214
|
-
_See code: [src/commands/install.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
220
|
+
_See code: [src/commands/install.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.8/src/commands/install.ts)_
|
|
215
221
|
|
|
216
222
|
## `aoox link`
|
|
217
223
|
|
|
218
|
-
|
|
224
|
+
Link this folder to an application in the panel (used by `aoox deploy`/`aoox logs`)
|
|
219
225
|
|
|
220
226
|
```
|
|
221
227
|
USAGE
|
|
222
228
|
$ aoox link [-t <value>] [-u <value>] [--app <value>] [--project <value>]
|
|
223
229
|
|
|
224
230
|
FLAGS
|
|
225
|
-
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…);
|
|
226
|
-
-u, --url=<value> [env: AOOX_URL] URL
|
|
227
|
-
|
|
228
|
-
--
|
|
231
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); defaults to the value from `aoox login`
|
|
232
|
+
-u, --url=<value> [env: AOOX_URL] Dashboard URL (the address you open the dashboard with, e.g.
|
|
233
|
+
https://dashboard.example.com); defaults to the value from `aoox login`
|
|
234
|
+
--app=<value> Application ID; skip the interactive selection
|
|
235
|
+
--project=<value> Project ID; skip the interactive selection
|
|
229
236
|
|
|
230
237
|
DESCRIPTION
|
|
231
|
-
|
|
238
|
+
Link this folder to an application in the panel (used by `aoox deploy`/`aoox logs`)
|
|
232
239
|
|
|
233
240
|
EXAMPLES
|
|
234
241
|
$ aoox link
|
|
@@ -236,30 +243,33 @@ EXAMPLES
|
|
|
236
243
|
$ aoox link --project <id> --app <id>
|
|
237
244
|
```
|
|
238
245
|
|
|
239
|
-
_See code: [src/commands/link.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
246
|
+
_See code: [src/commands/link.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.8/src/commands/link.ts)_
|
|
240
247
|
|
|
241
248
|
## `aoox login`
|
|
242
249
|
|
|
243
|
-
|
|
250
|
+
Save the dashboard address and API token for other commands (the API address is discovered automatically)
|
|
244
251
|
|
|
245
252
|
```
|
|
246
253
|
USAGE
|
|
247
254
|
$ aoox login [-t <value>] [-u <value>]
|
|
248
255
|
|
|
249
256
|
FLAGS
|
|
250
|
-
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…);
|
|
251
|
-
-u, --url=<value> [env: AOOX_URL] URL
|
|
257
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); defaults to the value from `aoox login`
|
|
258
|
+
-u, --url=<value> [env: AOOX_URL] Dashboard URL (the address you open the dashboard with, e.g.
|
|
259
|
+
https://dashboard.example.com); defaults to the value from `aoox login`
|
|
252
260
|
|
|
253
261
|
DESCRIPTION
|
|
254
|
-
|
|
262
|
+
Save the dashboard address and API token for other commands (the API address is discovered automatically)
|
|
255
263
|
|
|
256
264
|
EXAMPLES
|
|
257
265
|
$ aoox login
|
|
258
266
|
|
|
259
|
-
$ aoox login --url https://
|
|
267
|
+
$ aoox login --url https://dashboard.example.com --token aoox_xxx
|
|
268
|
+
|
|
269
|
+
$ aoox login --url 203.0.113.10:3000 --token aoox_xxx
|
|
260
270
|
```
|
|
261
271
|
|
|
262
|
-
_See code: [src/commands/login.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
272
|
+
_See code: [src/commands/login.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.8/src/commands/login.ts)_
|
|
263
273
|
|
|
264
274
|
## `aoox plugins`
|
|
265
275
|
|
|
@@ -551,22 +561,57 @@ DESCRIPTION
|
|
|
551
561
|
|
|
552
562
|
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.5.2/src/commands/plugins/update.ts)_
|
|
553
563
|
|
|
564
|
+
## `aoox registry build IMAGE`
|
|
565
|
+
|
|
566
|
+
Build an image from a Dockerfile, named for the aoox registry (refuses a version that already exists there)
|
|
567
|
+
|
|
568
|
+
```
|
|
569
|
+
USAGE
|
|
570
|
+
$ aoox registry build IMAGE [-t <value>] [-u <value>] [--force] [--registry <value>] [--context <value>] [-f
|
|
571
|
+
<value>]
|
|
572
|
+
|
|
573
|
+
ARGUMENTS
|
|
574
|
+
IMAGE Image name and version, e.g. myapp:1.0.0
|
|
575
|
+
|
|
576
|
+
FLAGS
|
|
577
|
+
-f, --dockerfile=<value> [default: Dockerfile] Path to the Dockerfile
|
|
578
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); defaults to the value from `aoox login`
|
|
579
|
+
-u, --url=<value> [env: AOOX_URL] Dashboard URL (the address you open the dashboard with, e.g.
|
|
580
|
+
https://dashboard.example.com); defaults to the value from `aoox login`
|
|
581
|
+
--context=<value> [default: .] Docker build context
|
|
582
|
+
--force Overwrite a version that already exists in the registry
|
|
583
|
+
--registry=<value> Registry ID; defaults to the self-hosted registry
|
|
584
|
+
|
|
585
|
+
DESCRIPTION
|
|
586
|
+
Build an image from a Dockerfile, named for the aoox registry (refuses a version that already exists there)
|
|
587
|
+
|
|
588
|
+
EXAMPLES
|
|
589
|
+
$ aoox registry build myapp:1.0.0
|
|
590
|
+
|
|
591
|
+
$ aoox registry build team/api:2.1.0 -f docker/Dockerfile --context .
|
|
592
|
+
|
|
593
|
+
$ aoox registry build myapp:1.0.0 --force
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
_See code: [src/commands/registry/build.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.8/src/commands/registry/build.ts)_
|
|
597
|
+
|
|
554
598
|
## `aoox registry domain`
|
|
555
599
|
|
|
556
|
-
Set
|
|
600
|
+
Set or remove the custom domain for the self-hosted registry
|
|
557
601
|
|
|
558
602
|
```
|
|
559
603
|
USAGE
|
|
560
604
|
$ aoox registry domain [-t <value>] [-u <value>] [--clear] [--set <value>]
|
|
561
605
|
|
|
562
606
|
FLAGS
|
|
563
|
-
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…);
|
|
564
|
-
-u, --url=<value> [env: AOOX_URL] URL
|
|
565
|
-
|
|
566
|
-
--
|
|
607
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); defaults to the value from `aoox login`
|
|
608
|
+
-u, --url=<value> [env: AOOX_URL] Dashboard URL (the address you open the dashboard with, e.g.
|
|
609
|
+
https://dashboard.example.com); defaults to the value from `aoox login`
|
|
610
|
+
--clear Remove the domain, falling back to host:port
|
|
611
|
+
--set=<value> Domain for the self-hosted registry
|
|
567
612
|
|
|
568
613
|
DESCRIPTION
|
|
569
|
-
Set
|
|
614
|
+
Set or remove the custom domain for the self-hosted registry
|
|
570
615
|
|
|
571
616
|
EXAMPLES
|
|
572
617
|
$ aoox registry domain --set registry.example.com
|
|
@@ -574,27 +619,58 @@ EXAMPLES
|
|
|
574
619
|
$ aoox registry domain --clear
|
|
575
620
|
```
|
|
576
621
|
|
|
577
|
-
_See code: [src/commands/registry/domain.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
622
|
+
_See code: [src/commands/registry/domain.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.8/src/commands/registry/domain.ts)_
|
|
623
|
+
|
|
624
|
+
## `aoox registry push IMAGE`
|
|
625
|
+
|
|
626
|
+
Push a local image to the aoox registry (refuses a version that already exists there)
|
|
627
|
+
|
|
628
|
+
```
|
|
629
|
+
USAGE
|
|
630
|
+
$ aoox registry push IMAGE [-t <value>] [-u <value>] [--force] [--registry <value>]
|
|
631
|
+
|
|
632
|
+
ARGUMENTS
|
|
633
|
+
IMAGE Image name and version (short or full), e.g. myapp:1.0.0
|
|
634
|
+
|
|
635
|
+
FLAGS
|
|
636
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); defaults to the value from `aoox login`
|
|
637
|
+
-u, --url=<value> [env: AOOX_URL] Dashboard URL (the address you open the dashboard with, e.g.
|
|
638
|
+
https://dashboard.example.com); defaults to the value from `aoox login`
|
|
639
|
+
--force Overwrite a version that already exists in the registry
|
|
640
|
+
--registry=<value> Registry ID; defaults to the self-hosted registry
|
|
641
|
+
|
|
642
|
+
DESCRIPTION
|
|
643
|
+
Push a local image to the aoox registry (refuses a version that already exists there)
|
|
644
|
+
|
|
645
|
+
EXAMPLES
|
|
646
|
+
$ aoox registry push myapp:1.0.0
|
|
647
|
+
|
|
648
|
+
$ aoox registry push registry.example.com/myapp:1.0.0
|
|
649
|
+
|
|
650
|
+
$ aoox registry push myapp:1.0.0 --force
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
_See code: [src/commands/registry/push.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.8/src/commands/registry/push.ts)_
|
|
578
654
|
|
|
579
655
|
## `aoox reinstall`
|
|
580
656
|
|
|
581
|
-
|
|
657
|
+
Repair/refresh an existing aoox installation without losing data: rewrite compose, merge .env.dist (secrets are never regenerated), then pull + recreate
|
|
582
658
|
|
|
583
659
|
```
|
|
584
660
|
USAGE
|
|
585
661
|
$ aoox reinstall [--dir <value>] [--dry-run] [--no-pull] [--terminal-ssh-user <value>] [-y]
|
|
586
662
|
|
|
587
663
|
FLAGS
|
|
588
|
-
-y, --yes
|
|
589
|
-
--dir=<value> [default: /opt/aoox]
|
|
590
|
-
--dry-run
|
|
591
|
-
|
|
592
|
-
--no-pull
|
|
593
|
-
--terminal-ssh-user=<value>
|
|
664
|
+
-y, --yes Do not ask for confirmation
|
|
665
|
+
--dir=<value> [default: /opt/aoox] Installation directory
|
|
666
|
+
--dry-run Print the plan (changed files, keys to add, compose commands) without changing
|
|
667
|
+
anything
|
|
668
|
+
--no-pull Skip docker compose pull (use the images already present)
|
|
669
|
+
--terminal-ssh-user=<value> Set/overwrite TERMINAL_SSH_USER in .env.dist during repair
|
|
594
670
|
|
|
595
671
|
DESCRIPTION
|
|
596
|
-
|
|
597
|
-
|
|
672
|
+
Repair/refresh an existing aoox installation without losing data: rewrite compose, merge .env.dist (secrets are never
|
|
673
|
+
regenerated), then pull + recreate
|
|
598
674
|
|
|
599
675
|
EXAMPLES
|
|
600
676
|
sudo aoox reinstall --dry-run
|
|
@@ -604,49 +680,73 @@ EXAMPLES
|
|
|
604
680
|
sudo aoox reinstall --yes --terminal-ssh-user root
|
|
605
681
|
```
|
|
606
682
|
|
|
607
|
-
_See code: [src/commands/reinstall.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
683
|
+
_See code: [src/commands/reinstall.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.8/src/commands/reinstall.ts)_
|
|
608
684
|
|
|
609
685
|
## `aoox update`
|
|
610
686
|
|
|
611
|
-
|
|
687
|
+
Update the aoox CLI itself (use `aoox update panel` to update the panel)
|
|
612
688
|
|
|
613
689
|
```
|
|
614
690
|
USAGE
|
|
615
|
-
$ aoox update [
|
|
691
|
+
$ aoox update [--check]
|
|
616
692
|
|
|
617
693
|
FLAGS
|
|
618
|
-
|
|
619
|
-
-u, --url=<value> [env: AOOX_URL] URL panel aoox; default dari hasil `aoox login`
|
|
620
|
-
--apply Terapkan update jika tersedia (pull + restart)
|
|
694
|
+
--check Only report whether a newer version exists; change nothing
|
|
621
695
|
|
|
622
696
|
DESCRIPTION
|
|
623
|
-
|
|
697
|
+
Update the aoox CLI itself (use `aoox update panel` to update the panel)
|
|
624
698
|
|
|
625
699
|
EXAMPLES
|
|
626
700
|
$ aoox update
|
|
627
701
|
|
|
628
|
-
$ aoox update --
|
|
702
|
+
$ aoox update --check
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
_See code: [src/commands/update.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.8/src/commands/update.ts)_
|
|
706
|
+
|
|
707
|
+
## `aoox update panel`
|
|
708
|
+
|
|
709
|
+
Check for or apply updates to the aoox panel itself (the aoox-api and aoox-web images)
|
|
710
|
+
|
|
711
|
+
```
|
|
712
|
+
USAGE
|
|
713
|
+
$ aoox update panel [-t <value>] [-u <value>] [--apply]
|
|
714
|
+
|
|
715
|
+
FLAGS
|
|
716
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); defaults to the value from `aoox login`
|
|
717
|
+
-u, --url=<value> [env: AOOX_URL] Dashboard URL (the address you open the dashboard with, e.g.
|
|
718
|
+
https://dashboard.example.com); defaults to the value from `aoox login`
|
|
719
|
+
--apply Apply the update if one is available (pull + restart)
|
|
720
|
+
|
|
721
|
+
DESCRIPTION
|
|
722
|
+
Check for or apply updates to the aoox panel itself (the aoox-api and aoox-web images)
|
|
723
|
+
|
|
724
|
+
EXAMPLES
|
|
725
|
+
$ aoox update panel
|
|
726
|
+
|
|
727
|
+
$ aoox update panel --apply
|
|
629
728
|
```
|
|
630
729
|
|
|
631
|
-
_See code: [src/commands/update.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
730
|
+
_See code: [src/commands/update/panel.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.8/src/commands/update/panel.ts)_
|
|
632
731
|
|
|
633
732
|
## `aoox whoami`
|
|
634
733
|
|
|
635
|
-
|
|
734
|
+
Show the account and panel in use
|
|
636
735
|
|
|
637
736
|
```
|
|
638
737
|
USAGE
|
|
639
738
|
$ aoox whoami [--json] [-t <value>] [-u <value>]
|
|
640
739
|
|
|
641
740
|
FLAGS
|
|
642
|
-
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…);
|
|
643
|
-
-u, --url=<value> [env: AOOX_URL] URL
|
|
741
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); defaults to the value from `aoox login`
|
|
742
|
+
-u, --url=<value> [env: AOOX_URL] Dashboard URL (the address you open the dashboard with, e.g.
|
|
743
|
+
https://dashboard.example.com); defaults to the value from `aoox login`
|
|
644
744
|
|
|
645
745
|
GLOBAL FLAGS
|
|
646
746
|
--json Format output as json.
|
|
647
747
|
|
|
648
748
|
DESCRIPTION
|
|
649
|
-
|
|
749
|
+
Show the account and panel in use
|
|
650
750
|
|
|
651
751
|
EXAMPLES
|
|
652
752
|
$ aoox whoami
|
|
@@ -654,7 +754,7 @@ EXAMPLES
|
|
|
654
754
|
$ aoox whoami --json
|
|
655
755
|
```
|
|
656
756
|
|
|
657
|
-
_See code: [src/commands/whoami.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.
|
|
757
|
+
_See code: [src/commands/whoami.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.8/src/commands/whoami.ts)_
|
|
658
758
|
<!-- commandsstop -->
|
|
659
759
|
|
|
660
760
|
## Versioning
|
package/dist/commands/deploy.js
CHANGED
|
@@ -7,24 +7,26 @@ import { connectionFlags, loadCredentials } from '../lib/flags.js';
|
|
|
7
7
|
import { deployTag } from '../lib/git.js';
|
|
8
8
|
import { imageRefFor } from '../lib/image-ref.js';
|
|
9
9
|
import { readLink } from '../lib/link.js';
|
|
10
|
+
import { warnIfOutdated } from '../lib/outdated.js';
|
|
11
|
+
import { chooseRegistry, localhostRegistryHint } from '../lib/registry-select.js';
|
|
10
12
|
/** How often to poll GET /deployments/:id while a deploy is in progress. */
|
|
11
13
|
const POLL_MS = 1500;
|
|
12
14
|
export default class Deploy extends Command {
|
|
13
|
-
static description = 'Build image
|
|
15
|
+
static description = 'Build a local image, push it to the aoox registry, then deploy (the repo must be linked with `aoox link` first)';
|
|
14
16
|
static examples = ['<%= config.bin %> <%= command.id %>', '<%= config.bin %> <%= command.id %> --tag v1.2.3'];
|
|
15
17
|
static flags = {
|
|
16
18
|
...connectionFlags,
|
|
17
19
|
context: Flags.string({ default: '.', description: 'Docker build context' }),
|
|
18
|
-
dockerfile: Flags.string({ char: 'f', default: 'Dockerfile', description: 'Path
|
|
19
|
-
registry: Flags.string({ description: 'ID
|
|
20
|
-
tag: Flags.string({ description: '
|
|
20
|
+
dockerfile: Flags.string({ char: 'f', default: 'Dockerfile', description: 'Path to the Dockerfile' }),
|
|
21
|
+
registry: Flags.string({ description: 'Registry ID to push to; defaults to the self-hosted registry' }),
|
|
22
|
+
tag: Flags.string({ description: 'Image tag; defaults to the git short SHA (+ -dirty)' }),
|
|
21
23
|
};
|
|
22
24
|
async run() {
|
|
23
25
|
const { flags } = await this.parse(Deploy);
|
|
24
26
|
const cwd = process.cwd();
|
|
25
27
|
const link = await readLink(cwd);
|
|
26
28
|
if (!link) {
|
|
27
|
-
this.error('
|
|
29
|
+
this.error('This repo is not linked yet.', { suggestions: ['Run `aoox link` first.'] });
|
|
28
30
|
}
|
|
29
31
|
let config;
|
|
30
32
|
try {
|
|
@@ -32,13 +34,17 @@ export default class Deploy extends Command {
|
|
|
32
34
|
}
|
|
33
35
|
catch (error) {
|
|
34
36
|
if (error instanceof MissingCredentialsError) {
|
|
35
|
-
this.error(error.message, { suggestions: ['
|
|
37
|
+
this.error(error.message, { suggestions: ['Run `aoox login`.'] });
|
|
36
38
|
}
|
|
37
39
|
throw error;
|
|
38
40
|
}
|
|
41
|
+
await warnIfOutdated((m) => this.warn(m), this.config.version, config);
|
|
39
42
|
const app = await this.getApplication(config, link.applicationId);
|
|
40
43
|
const registry = await this.pickRegistry(config, flags.registry);
|
|
41
44
|
const credentials = await api(config, `/registries/${registry.id}/credentials`);
|
|
45
|
+
const localHint = localhostRegistryHint(registry.url, config.url);
|
|
46
|
+
if (localHint)
|
|
47
|
+
this.warn(localHint);
|
|
42
48
|
const tag = flags.tag ?? deployTag(cwd);
|
|
43
49
|
const imageRef = imageRefFor({ appName: app.appName, projectName: app.project.name, registryUrl: registry.url, tag });
|
|
44
50
|
this.log(`==> Build ${imageRef}`);
|
|
@@ -49,7 +55,7 @@ export default class Deploy extends Command {
|
|
|
49
55
|
}
|
|
50
56
|
this.log(`==> Push ${imageRef}`);
|
|
51
57
|
await dockerInherit(['push', imageRef], cwd);
|
|
52
|
-
this.log('==>
|
|
58
|
+
this.log('==> Updating the application & triggering a deploy');
|
|
53
59
|
await api(config, `/applications/${app.id}`, {
|
|
54
60
|
body: { imageRef, imageRegistryId: registry.id, sourceType: 'image' },
|
|
55
61
|
method: 'PATCH',
|
|
@@ -74,7 +80,7 @@ export default class Deploy extends Command {
|
|
|
74
80
|
return;
|
|
75
81
|
}
|
|
76
82
|
if (dep.status === 'failed') {
|
|
77
|
-
this.error(dep.errorMessage ?? 'Deployment
|
|
83
|
+
this.error(dep.errorMessage ?? 'Deployment failed.');
|
|
78
84
|
}
|
|
79
85
|
await new Promise((resolve) => {
|
|
80
86
|
setTimeout(resolve, POLL_MS);
|
|
@@ -87,40 +93,29 @@ export default class Deploy extends Command {
|
|
|
87
93
|
}
|
|
88
94
|
catch (error) {
|
|
89
95
|
if (error instanceof ApiError && error.status === 401) {
|
|
90
|
-
this.error('
|
|
96
|
+
this.error('The token is no longer valid.', { suggestions: ['Run `aoox login`.'] });
|
|
91
97
|
}
|
|
92
98
|
if (error instanceof ApiError && error.status === 404) {
|
|
93
|
-
this.error('
|
|
99
|
+
this.error('The linked application no longer exists.', { suggestions: ['Run `aoox link` again.'] });
|
|
94
100
|
}
|
|
95
101
|
throw error;
|
|
96
102
|
}
|
|
97
103
|
}
|
|
98
104
|
async pickRegistry(config, registryId) {
|
|
99
105
|
const registries = await api(config, '/registries');
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
if (registries.length === 0) {
|
|
107
|
-
this.error('Belum ada registry di panel.', {
|
|
108
|
-
suggestions: ['Provision registry lokal di Infrastruktur, atau tambah registry eksternal.'],
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
const selfHosted = registries.find((r) => r.type === 'self-hosted');
|
|
112
|
-
if (selfHosted)
|
|
113
|
-
return selfHosted;
|
|
114
|
-
if (registries.length === 1)
|
|
115
|
-
return registries[0];
|
|
106
|
+
const choice = chooseRegistry(registries, registryId);
|
|
107
|
+
if (choice.kind === 'found')
|
|
108
|
+
return choice.registry;
|
|
109
|
+
if (choice.kind === 'error')
|
|
110
|
+
this.error(choice.message, { suggestions: choice.suggestions });
|
|
116
111
|
if (!process.stdin.isTTY) {
|
|
117
|
-
this.error('
|
|
118
|
-
suggestions: ['
|
|
112
|
+
this.error('There are several registries and none is self-hosted; cannot pick one automatically.', {
|
|
113
|
+
suggestions: ['Pass --registry <id>.'],
|
|
119
114
|
});
|
|
120
115
|
}
|
|
121
116
|
return select({
|
|
122
|
-
choices: registries.map((r) => ({ name: `${r.name} (${r.url})`, value: r })),
|
|
123
|
-
message: '
|
|
117
|
+
choices: choice.registries.map((r) => ({ name: `${r.name} (${r.url})`, value: r })),
|
|
118
|
+
message: 'Select a registry',
|
|
124
119
|
});
|
|
125
120
|
}
|
|
126
121
|
/** `POST /:id/deploy` returns 409 while another deployment is already running. */
|
|
@@ -130,8 +125,8 @@ export default class Deploy extends Command {
|
|
|
130
125
|
}
|
|
131
126
|
catch (error) {
|
|
132
127
|
if (error instanceof ApiError && error.status === 409) {
|
|
133
|
-
this.error('
|
|
134
|
-
suggestions: ['
|
|
128
|
+
this.error('A deployment is already running for this application.', {
|
|
129
|
+
suggestions: ['Wait for that deployment to finish, then try again.'],
|
|
135
130
|
});
|
|
136
131
|
}
|
|
137
132
|
throw error;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from '@oclif/core';
|
|
2
2
|
/**
|
|
3
3
|
* Post-install alternative to hand-editing docker-compose.domain.yml/.env.dist
|
|
4
|
-
* over SSH (see
|
|
4
|
+
* over SSH (see the aoox-api AGENTS.md "Domains for the panel itself"):
|
|
5
5
|
* calls the panel's own `PATCH /instance/domain`, which recreates its web/api
|
|
6
6
|
* containers. Requires INSTALL_DIR to already be set in the panel's .env.dist.
|
|
7
7
|
*/
|