@hideandseeklab/aoox 0.1.0-alpha.0 → 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 +219 -1
- package/assets/install/docker-compose.dist.yml +159 -146
- package/assets/install/docker-compose.domain.yml +49 -49
- package/bin/dev.cmd +3 -3
- package/bin/dev.js +15 -15
- package/bin/run.cmd +3 -3
- package/bin/run.js +11 -11
- package/dist/commands/deploy.d.ts +25 -0
- package/dist/commands/deploy.js +140 -0
- package/dist/commands/domain/set.d.ts +19 -0
- package/dist/commands/domain/set.js +65 -0
- package/dist/commands/install.d.ts +25 -0
- package/dist/commands/install.js +167 -0
- package/dist/commands/link.d.ts +14 -0
- package/dist/commands/link.js +99 -0
- package/dist/commands/login.d.ts +12 -0
- package/dist/commands/login.js +53 -0
- package/dist/commands/registry/domain.d.ts +18 -0
- package/dist/commands/registry/domain.js +60 -0
- package/dist/commands/update.d.ts +18 -0
- package/dist/commands/update.js +60 -0
- package/dist/commands/whoami.d.ts +15 -0
- package/dist/commands/whoami.js +37 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/api.d.ts +20 -0
- package/dist/lib/api.js +71 -0
- package/dist/lib/config.d.ts +33 -0
- package/dist/lib/config.js +77 -0
- package/dist/lib/docker.d.ts +11 -0
- package/dist/lib/docker.js +51 -0
- package/dist/lib/flags.d.ts +21 -0
- package/dist/lib/flags.js +30 -0
- package/dist/lib/git.d.ts +13 -0
- package/dist/lib/git.js +34 -0
- package/dist/lib/image-ref.d.ts +12 -0
- package/dist/lib/image-ref.js +16 -0
- package/dist/lib/install-env.d.ts +28 -0
- package/dist/lib/install-env.js +61 -0
- package/dist/lib/link.d.ts +12 -0
- package/dist/lib/link.js +41 -0
- package/dist/lib/system.d.ts +16 -0
- package/dist/lib/system.js +66 -0
- package/dist/lib/types.d.ts +63 -0
- package/dist/lib/types.js +6 -0
- package/dist/lib/windows-exit-fix.d.ts +31 -0
- package/dist/lib/windows-exit-fix.js +32 -0
- package/oclif.manifest.json +508 -2
- package/package.json +77 -77
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
|
|
@@ -56,7 +56,12 @@ npm link # or: npm install -g .
|
|
|
56
56
|
|
|
57
57
|
# Commands
|
|
58
58
|
<!-- commands -->
|
|
59
|
+
* [`aoox deploy`](#aoox-deploy)
|
|
60
|
+
* [`aoox domain set`](#aoox-domain-set)
|
|
59
61
|
* [`aoox help [COMMAND]`](#aoox-help-command)
|
|
62
|
+
* [`aoox install`](#aoox-install)
|
|
63
|
+
* [`aoox link`](#aoox-link)
|
|
64
|
+
* [`aoox login`](#aoox-login)
|
|
60
65
|
* [`aoox plugins`](#aoox-plugins)
|
|
61
66
|
* [`aoox plugins add PLUGIN`](#aoox-plugins-add-plugin)
|
|
62
67
|
* [`aoox plugins:inspect PLUGIN...`](#aoox-pluginsinspect-plugin)
|
|
@@ -67,6 +72,63 @@ npm link # or: npm install -g .
|
|
|
67
72
|
* [`aoox plugins uninstall [PLUGIN]`](#aoox-plugins-uninstall-plugin)
|
|
68
73
|
* [`aoox plugins unlink [PLUGIN]`](#aoox-plugins-unlink-plugin)
|
|
69
74
|
* [`aoox plugins update`](#aoox-plugins-update)
|
|
75
|
+
* [`aoox registry domain`](#aoox-registry-domain)
|
|
76
|
+
* [`aoox update`](#aoox-update)
|
|
77
|
+
* [`aoox whoami`](#aoox-whoami)
|
|
78
|
+
|
|
79
|
+
## `aoox deploy`
|
|
80
|
+
|
|
81
|
+
Build image lokal, push ke registry aoox, lalu deploy (repo harus di-`aoox link` dulu)
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
USAGE
|
|
85
|
+
$ aoox deploy [-t <value>] [-u <value>] [--context <value>] [-f <value>] [--registry <value>] [--tag
|
|
86
|
+
<value>]
|
|
87
|
+
|
|
88
|
+
FLAGS
|
|
89
|
+
-f, --dockerfile=<value> [default: Dockerfile] Path ke Dockerfile
|
|
90
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); default dari hasil `aoox login`
|
|
91
|
+
-u, --url=<value> [env: AOOX_URL] URL panel aoox; default dari hasil `aoox login`
|
|
92
|
+
--context=<value> [default: .] Docker build context
|
|
93
|
+
--registry=<value> ID registry tujuan push; default registry self-hosted
|
|
94
|
+
--tag=<value> Tag image; default git short SHA (+ -dirty)
|
|
95
|
+
|
|
96
|
+
DESCRIPTION
|
|
97
|
+
Build image lokal, push ke registry aoox, lalu deploy (repo harus di-`aoox link` dulu)
|
|
98
|
+
|
|
99
|
+
EXAMPLES
|
|
100
|
+
$ aoox deploy
|
|
101
|
+
|
|
102
|
+
$ aoox deploy --tag v1.2.3
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
_See code: [src/commands/deploy.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/deploy.ts)_
|
|
106
|
+
|
|
107
|
+
## `aoox domain set`
|
|
108
|
+
|
|
109
|
+
Set domain kustom untuk panel itu sendiri (bukan aplikasi) lewat API panel yang sudah jalan
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
USAGE
|
|
113
|
+
$ aoox domain set --api <value> --web <value> [-t <value>] [-u <value>] [--acme-email <value>]
|
|
114
|
+
|
|
115
|
+
FLAGS
|
|
116
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); default dari hasil `aoox login`
|
|
117
|
+
-u, --url=<value> [env: AOOX_URL] URL panel aoox; default dari hasil `aoox login`
|
|
118
|
+
--acme-email=<value> Email untuk sertifikat Let's Encrypt
|
|
119
|
+
--api=<value> (required) Domain untuk API panel
|
|
120
|
+
--web=<value> (required) Domain untuk dashboard panel
|
|
121
|
+
|
|
122
|
+
DESCRIPTION
|
|
123
|
+
Set domain kustom untuk panel itu sendiri (bukan aplikasi) lewat API panel yang sudah jalan
|
|
124
|
+
|
|
125
|
+
EXAMPLES
|
|
126
|
+
$ aoox domain set --web panel.example.com --api api.example.com
|
|
127
|
+
|
|
128
|
+
$ aoox domain set --web panel.example.com --api api.example.com --acme-email you@example.com
|
|
129
|
+
```
|
|
130
|
+
|
|
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)_
|
|
70
132
|
|
|
71
133
|
## `aoox help [COMMAND]`
|
|
72
134
|
|
|
@@ -88,6 +150,87 @@ DESCRIPTION
|
|
|
88
150
|
|
|
89
151
|
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.3.0/src/commands/help.ts)_
|
|
90
152
|
|
|
153
|
+
## `aoox install`
|
|
154
|
+
|
|
155
|
+
Pasang aoox (postgres + api + web) di VPS baru lewat Docker Compose
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
USAGE
|
|
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] [--terminal-ssh-user <value>] [-y]
|
|
161
|
+
|
|
162
|
+
FLAGS
|
|
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
|
|
174
|
+
|
|
175
|
+
DESCRIPTION
|
|
176
|
+
Pasang aoox (postgres + api + web) di VPS baru lewat Docker Compose
|
|
177
|
+
|
|
178
|
+
EXAMPLES
|
|
179
|
+
sudo aoox install
|
|
180
|
+
|
|
181
|
+
sudo aoox install --web-domain panel.example.com --api-domain api.panel.example.com --acme-email me@example.com
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
_See code: [src/commands/install.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/install.ts)_
|
|
185
|
+
|
|
186
|
+
## `aoox link`
|
|
187
|
+
|
|
188
|
+
Hubungkan folder ini ke sebuah aplikasi di panel (dipakai `aoox deploy`/`aoox logs`)
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
USAGE
|
|
192
|
+
$ aoox link [-t <value>] [-u <value>] [--app <value>] [--project <value>]
|
|
193
|
+
|
|
194
|
+
FLAGS
|
|
195
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); default dari hasil `aoox login`
|
|
196
|
+
-u, --url=<value> [env: AOOX_URL] URL panel aoox; default dari hasil `aoox login`
|
|
197
|
+
--app=<value> ID aplikasi; lewati pemilihan interaktif
|
|
198
|
+
--project=<value> ID project; lewati pemilihan interaktif
|
|
199
|
+
|
|
200
|
+
DESCRIPTION
|
|
201
|
+
Hubungkan folder ini ke sebuah aplikasi di panel (dipakai `aoox deploy`/`aoox logs`)
|
|
202
|
+
|
|
203
|
+
EXAMPLES
|
|
204
|
+
$ aoox link
|
|
205
|
+
|
|
206
|
+
$ aoox link --project <id> --app <id>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
_See code: [src/commands/link.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/link.ts)_
|
|
210
|
+
|
|
211
|
+
## `aoox login`
|
|
212
|
+
|
|
213
|
+
Simpan URL panel dan API token untuk perintah lain
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
USAGE
|
|
217
|
+
$ aoox login [-t <value>] [-u <value>]
|
|
218
|
+
|
|
219
|
+
FLAGS
|
|
220
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); default dari hasil `aoox login`
|
|
221
|
+
-u, --url=<value> [env: AOOX_URL] URL panel aoox; default dari hasil `aoox login`
|
|
222
|
+
|
|
223
|
+
DESCRIPTION
|
|
224
|
+
Simpan URL panel dan API token untuk perintah lain
|
|
225
|
+
|
|
226
|
+
EXAMPLES
|
|
227
|
+
$ aoox login
|
|
228
|
+
|
|
229
|
+
$ aoox login --url https://panel.example.com --token aoox_xxx
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
_See code: [src/commands/login.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/login.ts)_
|
|
233
|
+
|
|
91
234
|
## `aoox plugins`
|
|
92
235
|
|
|
93
236
|
List installed plugins.
|
|
@@ -377,6 +520,81 @@ DESCRIPTION
|
|
|
377
520
|
```
|
|
378
521
|
|
|
379
522
|
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.5.2/src/commands/plugins/update.ts)_
|
|
523
|
+
|
|
524
|
+
## `aoox registry domain`
|
|
525
|
+
|
|
526
|
+
Set atau hapus domain kustom untuk registry self-hosted
|
|
527
|
+
|
|
528
|
+
```
|
|
529
|
+
USAGE
|
|
530
|
+
$ aoox registry domain [-t <value>] [-u <value>] [--clear] [--set <value>]
|
|
531
|
+
|
|
532
|
+
FLAGS
|
|
533
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); default dari hasil `aoox login`
|
|
534
|
+
-u, --url=<value> [env: AOOX_URL] URL panel aoox; default dari hasil `aoox login`
|
|
535
|
+
--clear Hapus domain, kembali ke host:port
|
|
536
|
+
--set=<value> Domain untuk registry self-hosted
|
|
537
|
+
|
|
538
|
+
DESCRIPTION
|
|
539
|
+
Set atau hapus domain kustom untuk registry self-hosted
|
|
540
|
+
|
|
541
|
+
EXAMPLES
|
|
542
|
+
$ aoox registry domain --set registry.example.com
|
|
543
|
+
|
|
544
|
+
$ aoox registry domain --clear
|
|
545
|
+
```
|
|
546
|
+
|
|
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)_
|
|
548
|
+
|
|
549
|
+
## `aoox update`
|
|
550
|
+
|
|
551
|
+
Cek atau terapkan update untuk panel aoox itu sendiri
|
|
552
|
+
|
|
553
|
+
```
|
|
554
|
+
USAGE
|
|
555
|
+
$ aoox update [-t <value>] [-u <value>] [--apply]
|
|
556
|
+
|
|
557
|
+
FLAGS
|
|
558
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); default dari hasil `aoox login`
|
|
559
|
+
-u, --url=<value> [env: AOOX_URL] URL panel aoox; default dari hasil `aoox login`
|
|
560
|
+
--apply Terapkan update jika tersedia (pull + restart)
|
|
561
|
+
|
|
562
|
+
DESCRIPTION
|
|
563
|
+
Cek atau terapkan update untuk panel aoox itu sendiri
|
|
564
|
+
|
|
565
|
+
EXAMPLES
|
|
566
|
+
$ aoox update
|
|
567
|
+
|
|
568
|
+
$ aoox update --apply
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
_See code: [src/commands/update.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/update.ts)_
|
|
572
|
+
|
|
573
|
+
## `aoox whoami`
|
|
574
|
+
|
|
575
|
+
Tampilkan akun dan panel yang sedang dipakai
|
|
576
|
+
|
|
577
|
+
```
|
|
578
|
+
USAGE
|
|
579
|
+
$ aoox whoami [--json] [-t <value>] [-u <value>]
|
|
580
|
+
|
|
581
|
+
FLAGS
|
|
582
|
+
-t, --token=<value> [env: AOOX_TOKEN] API token (aoox_…); default dari hasil `aoox login`
|
|
583
|
+
-u, --url=<value> [env: AOOX_URL] URL panel aoox; default dari hasil `aoox login`
|
|
584
|
+
|
|
585
|
+
GLOBAL FLAGS
|
|
586
|
+
--json Format output as json.
|
|
587
|
+
|
|
588
|
+
DESCRIPTION
|
|
589
|
+
Tampilkan akun dan panel yang sedang dipakai
|
|
590
|
+
|
|
591
|
+
EXAMPLES
|
|
592
|
+
$ aoox whoami
|
|
593
|
+
|
|
594
|
+
$ aoox whoami --json
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
_See code: [src/commands/whoami.ts](https://github.com/hideandseeklab/aoox-cli/blob/v0.1.0-alpha.2/src/commands/whoami.ts)_
|
|
380
598
|
<!-- commandsstop -->
|
|
381
599
|
|
|
382
600
|
## Versioning
|
|
@@ -1,146 +1,159 @@
|
|
|
1
|
-
# Distribution stack: postgres + api + web, using published images.
|
|
2
|
-
#
|
|
3
|
-
# cp .env.dist.example .env.dist # fill in the secrets
|
|
4
|
-
# docker compose -f docker-compose.dist.yml --env-file .env.dist up -d
|
|
5
|
-
#
|
|
6
|
-
# To build the images locally instead (both repos checked out side by side):
|
|
7
|
-
# docker compose -f docker-compose.dist.yml -f docker-compose.build.yml --env-file .env.dist up -d --build
|
|
8
|
-
#
|
|
9
|
-
# First run: open http://localhost:3000 and create the owner account on /setup,
|
|
10
|
-
# or set ADMIN_EMAIL/ADMIN_PASSWORD in .env.dist for non-interactive onboarding.
|
|
11
|
-
#
|
|
12
|
-
# Own domain (https, http redirected) for the panel itself: add the
|
|
13
|
-
# docker-compose.domain.yml override — see its header
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
#
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
#
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
1
|
+
# Distribution stack: postgres + api + web, using published images.
|
|
2
|
+
#
|
|
3
|
+
# cp .env.dist.example .env.dist # fill in the secrets
|
|
4
|
+
# docker compose -f docker-compose.dist.yml --env-file .env.dist up -d
|
|
5
|
+
#
|
|
6
|
+
# To build the images locally instead (both repos checked out side by side):
|
|
7
|
+
# docker compose -f docker-compose.dist.yml -f docker-compose.build.yml --env-file .env.dist up -d --build
|
|
8
|
+
#
|
|
9
|
+
# First run: open http://localhost:3000 and create the owner account on /setup,
|
|
10
|
+
# or set ADMIN_EMAIL/ADMIN_PASSWORD in .env.dist for non-interactive onboarding.
|
|
11
|
+
#
|
|
12
|
+
# Own domain (https, http redirected) for the panel itself: either add the
|
|
13
|
+
# docker-compose.domain.yml override manually — see its header — or set
|
|
14
|
+
# INSTALL_DIR below and use Settings -> "Domain panel" once the panel is up
|
|
15
|
+
# (owner only; writes docker-compose.override.yml here and restarts web/api).
|
|
16
|
+
# Published ports keep working for IP-based access either way.
|
|
17
|
+
#
|
|
18
|
+
# Web terminal: a container cannot open a shell on the host directly, so the
|
|
19
|
+
# API SSHes to it. The API generates its own keypair into
|
|
20
|
+
# ./secrets on first use; Settings -> Terminal shows the one-line command that
|
|
21
|
+
# authorizes it on the host. Set TERMINAL_SSH_USER in .env.dist.
|
|
22
|
+
|
|
23
|
+
name: aoox
|
|
24
|
+
|
|
25
|
+
# The panel's own containers rotate their logs too (same policy as the containers the API starts).
|
|
26
|
+
x-logging: &logging
|
|
27
|
+
driver: json-file
|
|
28
|
+
options:
|
|
29
|
+
max-size: ${CONTAINER_LOG_MAX_SIZE:-10m}
|
|
30
|
+
max-file: "${CONTAINER_LOG_MAX_FILE:-3}"
|
|
31
|
+
|
|
32
|
+
services:
|
|
33
|
+
postgres:
|
|
34
|
+
image: postgres:16-alpine
|
|
35
|
+
restart: unless-stopped
|
|
36
|
+
logging: *logging
|
|
37
|
+
environment:
|
|
38
|
+
POSTGRES_USER: aoox
|
|
39
|
+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env.dist}
|
|
40
|
+
POSTGRES_DB: aoox
|
|
41
|
+
volumes:
|
|
42
|
+
- postgres_data:/var/lib/postgresql/data
|
|
43
|
+
healthcheck:
|
|
44
|
+
test: ['CMD-SHELL', 'pg_isready -U aoox -d aoox']
|
|
45
|
+
interval: 5s
|
|
46
|
+
timeout: 3s
|
|
47
|
+
retries: 10
|
|
48
|
+
|
|
49
|
+
api:
|
|
50
|
+
image: ${API_IMAGE:-hideandseeklab/aoox-api:latest}
|
|
51
|
+
restart: unless-stopped
|
|
52
|
+
logging: *logging
|
|
53
|
+
# Node as PID 1 does not reap the shells spawned by the terminal feature.
|
|
54
|
+
init: true
|
|
55
|
+
depends_on:
|
|
56
|
+
postgres:
|
|
57
|
+
condition: service_healthy
|
|
58
|
+
environment:
|
|
59
|
+
NODE_ENV: production
|
|
60
|
+
PORT: 3001
|
|
61
|
+
DB_HOST: postgres
|
|
62
|
+
DB_PORT: 5432
|
|
63
|
+
DB_USERNAME: aoox
|
|
64
|
+
DB_PASSWORD: ${POSTGRES_PASSWORD}
|
|
65
|
+
DB_NAME: aoox
|
|
66
|
+
DB_MIGRATIONS_RUN: 'true'
|
|
67
|
+
JWT_SECRET: ${JWT_SECRET:?set JWT_SECRET in .env.dist (openssl rand -hex 32)}
|
|
68
|
+
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-7d}
|
|
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}
|
|
75
|
+
ADMIN_EMAIL: ${ADMIN_EMAIL:-}
|
|
76
|
+
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-}
|
|
77
|
+
ADMIN_NAME: ${ADMIN_NAME:-}
|
|
78
|
+
TERMINAL_SSH_HOST: ${TERMINAL_SSH_HOST:-}
|
|
79
|
+
TERMINAL_SSH_PORT: ${TERMINAL_SSH_PORT:-22}
|
|
80
|
+
TERMINAL_SSH_USER: ${TERMINAL_SSH_USER:-}
|
|
81
|
+
TERMINAL_SSH_PRIVATE_KEY_FILE: ${TERMINAL_SSH_PRIVATE_KEY_FILE:-}
|
|
82
|
+
TERMINAL_SSH_KEY_DIR: /run/secrets/aoox
|
|
83
|
+
TERMINAL_SSH_PASSPHRASE: ${TERMINAL_SSH_PASSPHRASE:-}
|
|
84
|
+
TERMINAL_SSH_PASSWORD: ${TERMINAL_SSH_PASSWORD:-}
|
|
85
|
+
ENCRYPTION_KEY: ${ENCRYPTION_KEY:?set ENCRYPTION_KEY in .env.dist (openssl rand -hex 32)}
|
|
86
|
+
# Self-hosted registry container is started by the API on the host engine.
|
|
87
|
+
REGISTRY_PORT: ${REGISTRY_PORT:-5000}
|
|
88
|
+
REGISTRY_PUBLIC_HOST: ${REGISTRY_PUBLIC_HOST:-localhost}
|
|
89
|
+
REGISTRY_INTERNAL_URL: http://host.docker.internal:${REGISTRY_PORT:-5000}
|
|
90
|
+
# Traefik reverse proxy (container started by the API on the host engine)
|
|
91
|
+
PROXY_HTTP_PORT: ${PROXY_HTTP_PORT:-80}
|
|
92
|
+
PROXY_HTTPS_PORT: ${PROXY_HTTPS_PORT:-443}
|
|
93
|
+
PROXY_ACME_EMAIL: ${PROXY_ACME_EMAIL:-}
|
|
94
|
+
PROXY_ACME_STAGING: ${PROXY_ACME_STAGING:-false}
|
|
95
|
+
# Log rotation for containers started by the API (json-file max-size/max-file)
|
|
96
|
+
METRICS_RETENTION_DAYS: ${METRICS_RETENTION_DAYS:-30}
|
|
97
|
+
# Railpack builds (BuildKit container started by the API on the host engine)
|
|
98
|
+
RAILPACK_VERSION: ${RAILPACK_VERSION:-0.39.0}
|
|
99
|
+
BUILDKIT_VERSION: ${BUILDKIT_VERSION:-v0.27.0}
|
|
100
|
+
BUILDKIT_CACHE_KEEP_GB: ${BUILDKIT_CACHE_KEEP_GB:-10}
|
|
101
|
+
CONTAINER_LOG_MAX_SIZE: ${CONTAINER_LOG_MAX_SIZE:-10m}
|
|
102
|
+
CONTAINER_LOG_MAX_FILE: ${CONTAINER_LOG_MAX_FILE:-3}
|
|
103
|
+
# Public IP app domains must point at (DNS check); auto-detected when empty.
|
|
104
|
+
PUBLIC_IP: ${PUBLIC_IP:-}
|
|
105
|
+
STORAGE_PATH: ${STORAGE_PATH:-}
|
|
106
|
+
# Absolute path, on this host, of the folder holding this file — required
|
|
107
|
+
# only for Settings -> "Domain panel" (lets the API write
|
|
108
|
+
# docker-compose.override.yml and re-run `docker compose up` here without
|
|
109
|
+
# SSH). Leave empty to keep configuring the panel's own domain manually
|
|
110
|
+
# via docker-compose.domain.yml (see its header).
|
|
111
|
+
INSTALL_DIR: ${INSTALL_DIR:-}
|
|
112
|
+
# The api container runs as the unprivileged `node` user; add the gid that
|
|
113
|
+
# owns the docker socket on the host (stat -c %g /var/run/docker.sock).
|
|
114
|
+
group_add:
|
|
115
|
+
- '${DOCKER_GID:-0}'
|
|
116
|
+
volumes:
|
|
117
|
+
# Auto-generated SSH key for the web terminal (written by uid 1000, the
|
|
118
|
+
# `node` user; chown ./secrets if the API reports EACCES).
|
|
119
|
+
- ./secrets:/run/secrets/aoox
|
|
120
|
+
# Docker engine access: needed to run the registry (and, later, deployments).
|
|
121
|
+
- /var/run/docker.sock:/var/run/docker.sock
|
|
122
|
+
# Lets TERMINAL_SSH_HOST=host.docker.internal work on Linux too.
|
|
123
|
+
extra_hosts:
|
|
124
|
+
- 'host.docker.internal:host-gateway'
|
|
125
|
+
ports:
|
|
126
|
+
- '${API_PORT:-3001}:3001'
|
|
127
|
+
networks:
|
|
128
|
+
- default
|
|
129
|
+
- aoox
|
|
130
|
+
|
|
131
|
+
web:
|
|
132
|
+
image: ${WEB_IMAGE:-hideandseeklab/aoox-web:latest}
|
|
133
|
+
restart: unless-stopped
|
|
134
|
+
logging: *logging
|
|
135
|
+
depends_on:
|
|
136
|
+
- api
|
|
137
|
+
environment:
|
|
138
|
+
# Server-side calls go over the compose network...
|
|
139
|
+
API_URL: http://api:3001
|
|
140
|
+
# ...while the browser (terminal socket) needs the externally reachable URL.
|
|
141
|
+
PUBLIC_API_URL: ${PUBLIC_API_URL:-http://localhost:3001}
|
|
142
|
+
# Session cookie is Secure only when WEB_ORIGIN is https:// (override with COOKIE_SECURE).
|
|
143
|
+
WEB_ORIGIN: ${WEB_ORIGIN:-http://localhost:3000}
|
|
144
|
+
COOKIE_SECURE: ${COOKIE_SECURE:-}
|
|
145
|
+
ports:
|
|
146
|
+
- '${WEB_PORT:-3000}:3000'
|
|
147
|
+
networks:
|
|
148
|
+
- default
|
|
149
|
+
- aoox
|
|
150
|
+
|
|
151
|
+
networks:
|
|
152
|
+
# Shared with the proxy (Traefik reaches web/api by name on it) and every app
|
|
153
|
+
# container. The explicit name matters: without it compose would create
|
|
154
|
+
# "aoox_aoox"; ProxyService.ensureNetwork then finds it existing.
|
|
155
|
+
aoox:
|
|
156
|
+
name: aoox
|
|
157
|
+
|
|
158
|
+
volumes:
|
|
159
|
+
postgres_data:
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
# Override: serve the panel on your own domain through the built-in proxy.
|
|
2
|
-
#
|
|
3
|
-
# 1. DNS: point WEB_DOMAIN and API_DOMAIN at this host.
|
|
4
|
-
# 2. .env.dist: set WEB_DOMAIN, API_DOMAIN, PROXY_ACME_EMAIL, and switch
|
|
5
|
-
# WEB_ORIGIN / PUBLIC_API_URL to the https URLs (see .env.dist.example).
|
|
6
|
-
# 3. docker compose -f docker-compose.dist.yml -f docker-compose.domain.yml --env-file .env.dist up -d
|
|
7
|
-
# 4. Provision the proxy from Settings (if not already). Certificates are
|
|
8
|
-
# issued on first request; http then redirects to https.
|
|
9
|
-
#
|
|
10
|
-
# Labels follow ProxyService.buildLabels (same router shape as app domains).
|
|
11
|
-
|
|
12
|
-
services:
|
|
13
|
-
web:
|
|
14
|
-
labels:
|
|
15
|
-
traefik.enable: 'true'
|
|
16
|
-
traefik.http.services.aoox-web.loadbalancer.server.port: '3000'
|
|
17
|
-
# web: 301 to https (Traefik drops :443 itself)
|
|
18
|
-
traefik.http.routers.aoox-web.rule: Host(`${WEB_DOMAIN:?set WEB_DOMAIN in .env.dist}`)
|
|
19
|
-
traefik.http.routers.aoox-web.entrypoints: web
|
|
20
|
-
traefik.http.routers.aoox-web.service: aoox-web
|
|
21
|
-
traefik.http.routers.aoox-web.middlewares: aoox-web-https@docker
|
|
22
|
-
traefik.http.middlewares.aoox-web-https.redirectscheme.scheme: https
|
|
23
|
-
traefik.http.middlewares.aoox-web-https.redirectscheme.permanent: 'true'
|
|
24
|
-
traefik.http.middlewares.aoox-web-https.redirectscheme.port: '${PROXY_HTTPS_PORT:-443}'
|
|
25
|
-
# websecure: Let's Encrypt via the `le` resolver (needs PROXY_ACME_EMAIL)
|
|
26
|
-
traefik.http.routers.aoox-web-secure.rule: Host(`${WEB_DOMAIN:?set WEB_DOMAIN in .env.dist}`)
|
|
27
|
-
traefik.http.routers.aoox-web-secure.entrypoints: websecure
|
|
28
|
-
traefik.http.routers.aoox-web-secure.service: aoox-web
|
|
29
|
-
traefik.http.routers.aoox-web-secure.tls: 'true'
|
|
30
|
-
traefik.http.routers.aoox-web-secure.tls.certresolver: le
|
|
31
|
-
|
|
32
|
-
api:
|
|
33
|
-
labels:
|
|
34
|
-
traefik.enable: 'true'
|
|
35
|
-
traefik.http.services.aoox-api.loadbalancer.server.port: '3001'
|
|
36
|
-
# web: 301 to https (Traefik drops :443 itself)
|
|
37
|
-
traefik.http.routers.aoox-api.rule: Host(`${API_DOMAIN:?set API_DOMAIN in .env.dist}`)
|
|
38
|
-
traefik.http.routers.aoox-api.entrypoints: web
|
|
39
|
-
traefik.http.routers.aoox-api.service: aoox-api
|
|
40
|
-
traefik.http.routers.aoox-api.middlewares: aoox-api-https@docker
|
|
41
|
-
traefik.http.middlewares.aoox-api-https.redirectscheme.scheme: https
|
|
42
|
-
traefik.http.middlewares.aoox-api-https.redirectscheme.permanent: 'true'
|
|
43
|
-
traefik.http.middlewares.aoox-api-https.redirectscheme.port: '${PROXY_HTTPS_PORT:-443}'
|
|
44
|
-
# websecure: Let's Encrypt via the `le` resolver (needs PROXY_ACME_EMAIL)
|
|
45
|
-
traefik.http.routers.aoox-api-secure.rule: Host(`${API_DOMAIN:?set API_DOMAIN in .env.dist}`)
|
|
46
|
-
traefik.http.routers.aoox-api-secure.entrypoints: websecure
|
|
47
|
-
traefik.http.routers.aoox-api-secure.service: aoox-api
|
|
48
|
-
traefik.http.routers.aoox-api-secure.tls: 'true'
|
|
49
|
-
traefik.http.routers.aoox-api-secure.tls.certresolver: le
|
|
1
|
+
# Override: serve the panel on your own domain through the built-in proxy.
|
|
2
|
+
#
|
|
3
|
+
# 1. DNS: point WEB_DOMAIN and API_DOMAIN at this host.
|
|
4
|
+
# 2. .env.dist: set WEB_DOMAIN, API_DOMAIN, PROXY_ACME_EMAIL, and switch
|
|
5
|
+
# WEB_ORIGIN / PUBLIC_API_URL to the https URLs (see .env.dist.example).
|
|
6
|
+
# 3. docker compose -f docker-compose.dist.yml -f docker-compose.domain.yml --env-file .env.dist up -d
|
|
7
|
+
# 4. Provision the proxy from Settings (if not already). Certificates are
|
|
8
|
+
# issued on first request; http then redirects to https.
|
|
9
|
+
#
|
|
10
|
+
# Labels follow ProxyService.buildLabels (same router shape as app domains).
|
|
11
|
+
|
|
12
|
+
services:
|
|
13
|
+
web:
|
|
14
|
+
labels:
|
|
15
|
+
traefik.enable: 'true'
|
|
16
|
+
traefik.http.services.aoox-web.loadbalancer.server.port: '3000'
|
|
17
|
+
# web: 301 to https (Traefik drops :443 itself)
|
|
18
|
+
traefik.http.routers.aoox-web.rule: Host(`${WEB_DOMAIN:?set WEB_DOMAIN in .env.dist}`)
|
|
19
|
+
traefik.http.routers.aoox-web.entrypoints: web
|
|
20
|
+
traefik.http.routers.aoox-web.service: aoox-web
|
|
21
|
+
traefik.http.routers.aoox-web.middlewares: aoox-web-https@docker
|
|
22
|
+
traefik.http.middlewares.aoox-web-https.redirectscheme.scheme: https
|
|
23
|
+
traefik.http.middlewares.aoox-web-https.redirectscheme.permanent: 'true'
|
|
24
|
+
traefik.http.middlewares.aoox-web-https.redirectscheme.port: '${PROXY_HTTPS_PORT:-443}'
|
|
25
|
+
# websecure: Let's Encrypt via the `le` resolver (needs PROXY_ACME_EMAIL)
|
|
26
|
+
traefik.http.routers.aoox-web-secure.rule: Host(`${WEB_DOMAIN:?set WEB_DOMAIN in .env.dist}`)
|
|
27
|
+
traefik.http.routers.aoox-web-secure.entrypoints: websecure
|
|
28
|
+
traefik.http.routers.aoox-web-secure.service: aoox-web
|
|
29
|
+
traefik.http.routers.aoox-web-secure.tls: 'true'
|
|
30
|
+
traefik.http.routers.aoox-web-secure.tls.certresolver: le
|
|
31
|
+
|
|
32
|
+
api:
|
|
33
|
+
labels:
|
|
34
|
+
traefik.enable: 'true'
|
|
35
|
+
traefik.http.services.aoox-api.loadbalancer.server.port: '3001'
|
|
36
|
+
# web: 301 to https (Traefik drops :443 itself)
|
|
37
|
+
traefik.http.routers.aoox-api.rule: Host(`${API_DOMAIN:?set API_DOMAIN in .env.dist}`)
|
|
38
|
+
traefik.http.routers.aoox-api.entrypoints: web
|
|
39
|
+
traefik.http.routers.aoox-api.service: aoox-api
|
|
40
|
+
traefik.http.routers.aoox-api.middlewares: aoox-api-https@docker
|
|
41
|
+
traefik.http.middlewares.aoox-api-https.redirectscheme.scheme: https
|
|
42
|
+
traefik.http.middlewares.aoox-api-https.redirectscheme.permanent: 'true'
|
|
43
|
+
traefik.http.middlewares.aoox-api-https.redirectscheme.port: '${PROXY_HTTPS_PORT:-443}'
|
|
44
|
+
# websecure: Let's Encrypt via the `le` resolver (needs PROXY_ACME_EMAIL)
|
|
45
|
+
traefik.http.routers.aoox-api-secure.rule: Host(`${API_DOMAIN:?set API_DOMAIN in .env.dist}`)
|
|
46
|
+
traefik.http.routers.aoox-api-secure.entrypoints: websecure
|
|
47
|
+
traefik.http.routers.aoox-api-secure.service: aoox-api
|
|
48
|
+
traefik.http.routers.aoox-api-secure.tls: 'true'
|
|
49
|
+
traefik.http.routers.aoox-api-secure.tls.certresolver: le
|