@hideandseeklab/aoox 0.1.0-alpha.0 → 0.1.0-alpha.1

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