alexandr 0.0.1 → 0.1.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.
@@ -0,0 +1,51 @@
1
+ # alexandr runtime — managed by the `alexandr` CLI.
2
+ # Do not edit by hand; use `alexandr config …` or re-run `alexandr up`.
3
+ # Pulls the published kernel image (no source build). Update with `alexandr update`.
4
+ #
5
+ # Host ports + image are templated so the CLI can override them via the .env it
6
+ # writes next to this file (ALEXANDR_KERNEL_PORT / ALEXANDR_HTTP_PORT / …).
7
+
8
+ services:
9
+ kernel:
10
+ image: ${ALEXANDR_IMAGE:-ghcr.io/alexandrco/alexandr-kernel:latest}
11
+ environment:
12
+ # The installer's placement stamp: a self-hosted box is an engine behind the
13
+ # desktop app — browsers at its root get the "open in the Alexandr app" page,
14
+ # never the web shell (that's the managed placement's surface).
15
+ ALEXANDR_PLACEMENT: self-hosted
16
+ # The HOST side of the port map below — inside the container the kernel only
17
+ # knows its internal port, and must not advertise that as its reachable URL.
18
+ ALEXANDR_ADVERTISED_PORT: ${ALEXANDR_KERNEL_PORT:-3030}
19
+ env_file:
20
+ - path: ./.env
21
+ required: false # every var is optional; the CLI writes this file
22
+ volumes:
23
+ - data:/data # instance state: OS db, installed apps, blobs
24
+ ports:
25
+ - "127.0.0.1:${ALEXANDR_KERNEL_PORT:-3030}:3030" # loopback only
26
+ restart: unless-stopped
27
+
28
+ # Public front door. Only started under the "public" profile — i.e. when a
29
+ # domain is configured (`alexandr up --domain …`). Pure-local runs skip it, so
30
+ # no root is needed for :80/:443 and there's no TLS machinery to babysit.
31
+ caddy:
32
+ image: caddy:2-alpine
33
+ profiles: ["public"]
34
+ depends_on:
35
+ - kernel
36
+ env_file:
37
+ - path: ./.env
38
+ required: false # reads ALEXANDR_DOMAIN
39
+ ports:
40
+ - "${ALEXANDR_HTTP_PORT:-80}:80"
41
+ - "${ALEXANDR_HTTPS_PORT:-443}:443"
42
+ volumes:
43
+ - ./Caddyfile:/etc/caddy/Caddyfile:ro
44
+ - caddy_data:/data
45
+ - caddy_config:/config
46
+ restart: unless-stopped
47
+
48
+ volumes:
49
+ data:
50
+ caddy_data:
51
+ caddy_config:
@@ -0,0 +1,49 @@
1
+ # alexandr runtime configuration — managed by the `alexandr` CLI.
2
+ # Prefer `alexandr config set <KEY> <VALUE>` over editing by hand. Every var is
3
+ # optional; an empty value is NOT the same as unset (keep unused lines commented).
4
+
5
+ # ---- ports (host side; the CLI sets these from --port) ----------------------
6
+ # ALEXANDR_KERNEL_PORT=3030 # loopback kernel port (http://127.0.0.1:<port>)
7
+ # ALEXANDR_HTTP_PORT=80 # Caddy HTTP (only with a domain)
8
+ # ALEXANDR_HTTPS_PORT=443 # Caddy HTTPS (only with a domain)
9
+
10
+ # ---- image (the CLI pins this for `update --to <tag>` / `--rollback`) -------
11
+ # ALEXANDR_IMAGE=ghcr.io/alexandrco/alexandr-kernel:latest
12
+
13
+ # ---- account link (REQUIRED — the runtime refuses to serve unlinked) --------
14
+ # Every runtime must be linked to an alexandr account before it serves anyone
15
+ # (.decode/docs/plans/account-required-runtimes.md). `alexandr up` signs you in as
16
+ # step one and writes these three; you never fill them by hand. The control plane is
17
+ # the identity authority, the runtime a pure verifier (no static tokens, no local
18
+ # login). Self-hosted workspaces open in the Alexandr DESKTOP app — a browser at the
19
+ # box gets an "open in the app" page, not a web workspace.
20
+ # ALEXANDR_CP_URL=https://api.alexandr.so
21
+ # ALEXANDR_INSTANCE_ID=
22
+ # ALEXANDR_RUNTIME_SECRET=
23
+ # ALEXANDR_WORKSPACE_ID= # account-side record id (used by `destroy --unlink`)
24
+
25
+ # Public domain for Caddy auto-HTTPS. Setting this starts the "public" profile — the
26
+ # supported way to reach the runtime from another machine. Without a domain the
27
+ # kernel binds loopback only (this machine). Access on an exposed box is the desktop
28
+ # app's account sign-in — no separate token exists.
29
+ # ALEXANDR_DOMAIN=alexandr.example.com
30
+
31
+ # Advertised URL the connect link points at, when you've made the runtime
32
+ # reachable some other way (your own reverse proxy, a tunnel, a LAN bind). Must
33
+ # point at where clients can ACTUALLY reach it — it doesn't change how the kernel
34
+ # binds. Overrides the domain/loopback default in the printed connect link.
35
+ # ALEXANDR_PUBLIC_URL=https://alexandr.example.com
36
+
37
+ # ---- AI provider (optional) -------------------------------------------------
38
+ # xrouter is the sole AI gateway, and it owns credentials + spend — the runtime
39
+ # stores no AI key. This only picks WHICH xrouter (defaults to the public one) and
40
+ # the default model.
41
+ # ALEXANDR_AI_BASE_URL=https://api.xrouter.so/v1
42
+ # ALEXANDR_COPILOT_MODEL=
43
+
44
+ # ---- app marketplace (optional) ---------------------------------------------
45
+ # ALEXANDR_CATALOG_URL=
46
+
47
+ # ---- updates ----------------------------------------------------------------
48
+ # Defaults to the public release feed. Set to empty to turn update checks OFF.
49
+ # ALEXANDR_RELEASES_URL=