anbaric-hosting 1.0.0 → 1.0.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.
- package/README.md +43 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# anbaric-hosting
|
|
2
|
+
|
|
3
|
+
Run your own Anbaric platform. This package re-exports
|
|
4
|
+
[`anbaric-cloud-hosting`](https://npmjs.com/package/anbaric-cloud-hosting)
|
|
5
|
+
(the platform library) and provides the `anbaric-hosting` command that boots
|
|
6
|
+
the full service: the public API and pages, the internal entry point for
|
|
7
|
+
apps, the queue dispatcher, and the app build layer.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g anbaric-hosting
|
|
11
|
+
ANBARIC_DATABASE_URL=postgres://user:pass@host:5432/anbaric anbaric-hosting
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The platform is configured entirely through environment variables:
|
|
15
|
+
|
|
16
|
+
| Variable | Purpose | Default |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
| `ANBARIC_DATABASE_URL` | Postgres connection string (jobs, documents, queue, system tables) | — required |
|
|
19
|
+
| `ANBARIC_HOSTING_PORT` | public entry point (auth-walled: API, dashboard, app proxy) | `8787` |
|
|
20
|
+
| `ANBARIC_INTERNAL_PORT` | internal entry point (unauthenticated workflow APIs; never expose publicly) | `8788` |
|
|
21
|
+
| `ANBARIC_PLATFORM_PUBLIC_URL` | public URL, used for login callbacks | `http://localhost:8787` |
|
|
22
|
+
| `ANBARIC_PLATFORM_INTERNAL_URL` | how deployed apps reach the internal entry point | `http://localhost:<internal port>` |
|
|
23
|
+
| `ANBARIC_TENANT` | tenant this platform serves (returned to the CLI on login) | — |
|
|
24
|
+
| `ANBARIC_BUILD_LAYER` | `docker` (needs a docker socket) or `fargate` (AWS); unset disables app deployment | unset |
|
|
25
|
+
| `ANBARIC_AUTHENTICATOR` | module name of an auth plugin exposing `createAuthenticator()` | unset (auth disabled) |
|
|
26
|
+
| `ANBARIC_APPS_DIR` | working directory for app bundles | `/tmp/anbaric-apps` |
|
|
27
|
+
| `ANBARIC_DISPATCH_INTERVAL_MS` | queue dispatch interval | `1000` |
|
|
28
|
+
|
|
29
|
+
With `ANBARIC_BUILD_LAYER=docker`: `ANBARIC_APP_BASE_IMAGE`,
|
|
30
|
+
`ANBARIC_DOCKER_NETWORK`. With `fargate`: the `ANBARIC_AWS_*` set (cluster,
|
|
31
|
+
subnets, security group, Cloud Map namespace, ECR repository, S3 build
|
|
32
|
+
bucket, CodeBuild project, base image, app execution role, log group) —
|
|
33
|
+
see the [`anbaric-cloud-hosting`](https://npmjs.com/package/anbaric-cloud-hosting)
|
|
34
|
+
README for the full table and the reference OpenTofu that provisions it all.
|
|
35
|
+
|
|
36
|
+
**The two entry points matter for security.** The public port serves
|
|
37
|
+
everything behind session/token authentication. The internal port serves
|
|
38
|
+
*only* the workflow resources (`jobs`, `queue`, `consumers`,
|
|
39
|
+
`state-machines`, `documents`, `secrets`, `/ping`) with no authentication —
|
|
40
|
+
it must only ever be reachable by deployed apps (same docker network, same
|
|
41
|
+
task, or a security-group rule).
|
|
42
|
+
|
|
43
|
+
Health check: `GET /ping` → `{"status":"ok"}` on both ports.
|
package/package.json
CHANGED