@askexenow/exe-os 0.9.82 → 0.9.84

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,73 @@
1
+ # exe-os VPS stack — environment variables
2
+ #
3
+ # Copy from .env.example and fill real values: cp .env.example .env
4
+ # `docker compose config` parses cleanly with this file unmodified — the stack
5
+ # uses bash-style ${VAR:-default} so missing vars never break parse.
6
+ # Anything prefixed CHANGEME_ MUST be replaced before `docker compose up -d`.
7
+
8
+ # ------------------------------------------------------------------
9
+ # Exe license — required for all services. Purchase at https://askexe.com
10
+ # ------------------------------------------------------------------
11
+ EXE_LICENSE_KEY=CHANGEME_EXE_LICENSE_KEY
12
+
13
+ # ------------------------------------------------------------------
14
+ # Image tags (per-client pinning — never use :latest in production)
15
+ # ------------------------------------------------------------------
16
+ CRM_IMAGE_TAG=ghcr.io/askexe/exe-crm:v0.9.1
17
+ WIKI_IMAGE_TAG=ghcr.io/askexe/exe-wiki:v0.9.1
18
+ EXED_IMAGE_TAG=ghcr.io/askexe/exed:v0.9.66
19
+ GATEWAY_IMAGE_TAG=ghcr.io/askexe/exe-gateway:v0.9.1
20
+
21
+ # ------------------------------------------------------------------
22
+ # Postgres (shared by CRM + wiki)
23
+ # ------------------------------------------------------------------
24
+ POSTGRES_USER=exe
25
+ POSTGRES_PASSWORD=CHANGEME_POSTGRES_PASSWORD
26
+ POSTGRES_DB=default
27
+ WIKI_DB_NAME=wiki
28
+
29
+ # ------------------------------------------------------------------
30
+ # ClickHouse (CRM analytics)
31
+ # ------------------------------------------------------------------
32
+ CLICKHOUSE_DB=default
33
+ CLICKHOUSE_USER=exe
34
+ CLICKHOUSE_PASSWORD=CHANGEME_CLICKHOUSE_PASSWORD
35
+
36
+ # ------------------------------------------------------------------
37
+ # Redis (CRM cache/queue)
38
+ # ------------------------------------------------------------------
39
+ REDIS_PASSWORD=CHANGEME_REDIS_PASSWORD
40
+
41
+ # ------------------------------------------------------------------
42
+ # CRM (Twenty fork)
43
+ # ------------------------------------------------------------------
44
+ CRM_SERVER_URL=https://CHANGEME_DOMAIN
45
+ CRM_APP_SECRET=CHANGEME_CRM_APP_SECRET
46
+ CRM_HOST_PORT=3000
47
+
48
+ # ------------------------------------------------------------------
49
+ # Wiki (AnythingLLM fork)
50
+ # ------------------------------------------------------------------
51
+ WIKI_AUTH_TOKEN=CHANGEME_WIKI_AUTH_TOKEN
52
+ WIKI_JWT_SECRET=CHANGEME_WIKI_JWT_SECRET
53
+ WIKI_SIG_KEY=CHANGEME_WIKI_SIG_KEY
54
+ WIKI_SIG_SALT=CHANGEME_WIKI_SIG_SALT
55
+ WIKI_HOST_PORT=3001
56
+
57
+ # ------------------------------------------------------------------
58
+ # exed (exe-os daemon — MCP embedding + memory backend)
59
+ # ------------------------------------------------------------------
60
+ EXED_MCP_TOKEN=CHANGEME_EXED_MCP_TOKEN
61
+ EXED_DEVICE_ID=vps-default
62
+
63
+ # ------------------------------------------------------------------
64
+ # Gateway (WhatsApp/Signal/webhook bridge)
65
+ # ------------------------------------------------------------------
66
+ EXE_GATEWAY_AUTH_TOKEN=CHANGEME_EXE_GATEWAY_AUTH_TOKEN
67
+ EXE_GATEWAY_WS_RELAY_AUTH_TOKEN=CHANGEME_EXE_GATEWAY_WS_RELAY_AUTH_TOKEN
68
+ EXE_GATEWAY_WHATSAPP_VERIFY_TOKEN=CHANGEME_EXE_GATEWAY_WHATSAPP_VERIFY_TOKEN
69
+ WHATSAPP_ACCESS_TOKEN=
70
+ API_ROUTER_URL=https://gateway.askexe.com
71
+ API_ROUTER_KEY=exe_rk_CHANGEME_API_ROUTER_KEY
72
+ GATEWAY_HTTP_HOST_PORT=3100
73
+ GATEWAY_WS_HOST_PORT=3101
@@ -0,0 +1,18 @@
1
+ # AskExe CONTROL-PLANE example environment variables
2
+ # This file is for AskExe-owned infrastructure only. Do NOT use for Hygo/customer VPSs.
3
+
4
+ # --- Central monitor hub (AskExe-owned: monitor.askexe.com) ---
5
+ MONITOR_HUB_IMAGE_TAG=ghcr.io/askexe/exe-monitor-hub:v0.9.2
6
+ MONITOR_HUB_PUBLIC_URL=https://monitor.askexe.com
7
+ MONITOR_HUB_SOURCE_DIR=/opt/exe-monitor
8
+ MONITOR_HUB_HOST_PORT=8090
9
+ MONITOR_HUB_DATA_DIR=/opt/exe-monitor-data
10
+ MONITOR_TRUSTED_AUTH_HEADER=X-AskExe-User-Email
11
+ # Keep false during bootstrap; set true only after GoTrue/auth proxy is verified.
12
+ MONITOR_DISABLE_PASSWORD_AUTH=false
13
+ MONITOR_USER_CREATION=true
14
+ MONITOR_SHARE_ALL_SYSTEMS=false
15
+
16
+ # --- AskExe central services (not customer-hosted) ---
17
+ # License server, update API, API router, and exe-create are AskExe-owned services.
18
+ # Customer VPSs consume them over HTTPS with EXE_LICENSE_KEY/API_ROUTER_KEY; they do not host them.
@@ -0,0 +1,69 @@
1
+ # exe-os CUSTOMER VPS stack — Hygo/customer example environment variables
2
+ # Copy to .env before deployment and replace every CHANGEME_* value.
3
+ # Values under # SET_MANUALLY must be provided by the operator.
4
+
5
+ # --- Data Layer ---
6
+ POSTGRES_USER=exe
7
+ POSTGRES_PASSWORD=CHANGEME_POSTGRES_PASSWORD
8
+ POSTGRES_DB=default
9
+
10
+ CLICKHOUSE_DB=default
11
+ CLICKHOUSE_USER=exe
12
+ CLICKHOUSE_PASSWORD=CHANGEME_CLICKHOUSE_PASSWORD
13
+
14
+ REDIS_PASSWORD=CHANGEME_REDIS_PASSWORD
15
+
16
+ # --- CRM ---
17
+ CRM_IMAGE_TAG=registry.askexe.com/askexe/exe-crm:v0.9.3
18
+ CRM_SERVER_URL=https://CHANGEME_DOMAIN
19
+ CRM_APP_SECRET=CHANGEME_CRM_APP_SECRET
20
+ CRM_HOST_PORT=3000
21
+
22
+ # --- Wiki ---
23
+ WIKI_IMAGE_TAG=registry.askexe.com/askexe/exe-wiki:v0.9.3
24
+ WIKI_DB_SCHEMA=wiki
25
+ WIKI_VECTOR_DB=postgres
26
+ WIKI_AUTH_TOKEN=CHANGEME_WIKI_AUTH_TOKEN
27
+ WIKI_JWT_SECRET=CHANGEME_WIKI_JWT_SECRET
28
+ WIKI_SIG_KEY=CHANGEME_WIKI_SIG_KEY
29
+ WIKI_SIG_SALT=CHANGEME_WIKI_SIG_SALT
30
+ WIKI_HOST_PORT=3001
31
+
32
+ # --- exed ---
33
+ EXED_IMAGE_TAG=registry.askexe.com/askexe/exed:v0.9.7
34
+ EXED_MCP_TOKEN=CHANGEME_EXED_MCP_TOKEN
35
+ EXED_DEVICE_ID=hygo-vps
36
+ # VPS-only: enables cloud/local SQLite -> exe-db Postgres projection.
37
+ # Keep false on laptops/dev boxes.
38
+ EXE_CLOUD_SYNC_TO_POSTGRES=true
39
+
40
+ # --- Gateway ---
41
+ GATEWAY_IMAGE_TAG=registry.askexe.com/askexe/exe-gateway:v0.9.3
42
+ EXE_GATEWAY_AUTH_TOKEN=CHANGEME_EXE_GATEWAY_AUTH_TOKEN
43
+ EXE_GATEWAY_WS_RELAY_AUTH_TOKEN=CHANGEME_EXE_GATEWAY_WS_RELAY_AUTH_TOKEN
44
+ EXE_GATEWAY_WHATSAPP_VERIFY_TOKEN=CHANGEME_EXE_GATEWAY_WHATSAPP_VERIFY_TOKEN
45
+ # SET_MANUALLY
46
+ WHATSAPP_ACCESS_TOKEN=
47
+ API_ROUTER_URL=https://gateway.askexe.com
48
+ API_ROUTER_KEY=exe_rk_CHANGEME_API_ROUTER_KEY
49
+ # BYOK: to use your own API keys instead of the Exe API Router,
50
+ # set BYOK_ENABLED=true and provide ANTHROPIC_API_KEY below.
51
+ # BYOK_ENABLED=false
52
+ # ANTHROPIC_API_KEY=CHANGEME_ANTHROPIC_API_KEY
53
+ GATEWAY_HTTP_HOST_PORT=3100
54
+ GATEWAY_WS_HOST_PORT=3101
55
+
56
+ # --- Monitoring agent (standard for managed customer VPSs) ---
57
+ MONITOR_AGENT_IMAGE_TAG=registry.askexe.com/askexe/exe-monitor-agent:v0.9.3
58
+ MONITOR_HUB_URL=https://monitor.askexe.com
59
+ # Required: values copied from monitor.askexe.com when adding the Hygo/customer system.
60
+ MONITOR_AGENT_TOKEN=CHANGEME_MONITOR_AGENT_TOKEN_FROM_MONITOR_HUB
61
+ MONITOR_AGENT_KEY=CHANGEME_MONITOR_AGENT_PUBLIC_KEY_FROM_MONITOR_HUB
62
+ MONITOR_AGENT_LISTEN=:45876
63
+
64
+ # --- AskExe central monitoring hub ---
65
+ # Not included on customer VPSs. Hygo/customer deployments run exe-monitor-agent above, never the hub.
66
+
67
+ # --- License ---
68
+ # injected by deploy_client
69
+ EXE_LICENSE_KEY=CHANGEME_EXE_LICENSE_KEY
@@ -0,0 +1,69 @@
1
+ # exe-os CUSTOMER VPS stack — Hygo/customer example environment variables
2
+ # Copy to .env before deployment and replace every CHANGEME_* value.
3
+ # Values under # SET_MANUALLY must be provided by the operator.
4
+
5
+ # --- Data Layer ---
6
+ POSTGRES_USER=exe
7
+ POSTGRES_PASSWORD=CHANGEME_POSTGRES_PASSWORD
8
+ POSTGRES_DB=default
9
+
10
+ CLICKHOUSE_DB=default
11
+ CLICKHOUSE_USER=exe
12
+ CLICKHOUSE_PASSWORD=CHANGEME_CLICKHOUSE_PASSWORD
13
+
14
+ REDIS_PASSWORD=CHANGEME_REDIS_PASSWORD
15
+
16
+ # --- CRM ---
17
+ CRM_IMAGE_TAG=registry.askexe.com/askexe/exe-crm:v0.9.3
18
+ CRM_SERVER_URL=https://CHANGEME_DOMAIN
19
+ CRM_APP_SECRET=CHANGEME_CRM_APP_SECRET
20
+ CRM_HOST_PORT=3000
21
+
22
+ # --- Wiki ---
23
+ WIKI_IMAGE_TAG=registry.askexe.com/askexe/exe-wiki:v0.9.3
24
+ WIKI_DB_SCHEMA=wiki
25
+ WIKI_VECTOR_DB=postgres
26
+ WIKI_AUTH_TOKEN=CHANGEME_WIKI_AUTH_TOKEN
27
+ WIKI_JWT_SECRET=CHANGEME_WIKI_JWT_SECRET
28
+ WIKI_SIG_KEY=CHANGEME_WIKI_SIG_KEY
29
+ WIKI_SIG_SALT=CHANGEME_WIKI_SIG_SALT
30
+ WIKI_HOST_PORT=3001
31
+
32
+ # --- exed ---
33
+ EXED_IMAGE_TAG=registry.askexe.com/askexe/exed:v0.9.7
34
+ EXED_MCP_TOKEN=CHANGEME_EXED_MCP_TOKEN
35
+ EXED_DEVICE_ID=hygo-vps
36
+ # VPS-only: enables cloud/local SQLite -> exe-db Postgres projection.
37
+ # Keep false on laptops/dev boxes.
38
+ EXE_CLOUD_SYNC_TO_POSTGRES=true
39
+
40
+ # --- Gateway ---
41
+ GATEWAY_IMAGE_TAG=registry.askexe.com/askexe/exe-gateway:v0.9.3
42
+ EXE_GATEWAY_AUTH_TOKEN=CHANGEME_EXE_GATEWAY_AUTH_TOKEN
43
+ EXE_GATEWAY_WS_RELAY_AUTH_TOKEN=CHANGEME_EXE_GATEWAY_WS_RELAY_AUTH_TOKEN
44
+ EXE_GATEWAY_WHATSAPP_VERIFY_TOKEN=CHANGEME_EXE_GATEWAY_WHATSAPP_VERIFY_TOKEN
45
+ # SET_MANUALLY
46
+ WHATSAPP_ACCESS_TOKEN=
47
+ API_ROUTER_URL=https://gateway.askexe.com
48
+ API_ROUTER_KEY=exe_rk_CHANGEME_API_ROUTER_KEY
49
+ # BYOK: to use your own API keys instead of the Exe API Router,
50
+ # set BYOK_ENABLED=true and provide ANTHROPIC_API_KEY below.
51
+ # BYOK_ENABLED=false
52
+ # ANTHROPIC_API_KEY=CHANGEME_ANTHROPIC_API_KEY
53
+ GATEWAY_HTTP_HOST_PORT=3100
54
+ GATEWAY_WS_HOST_PORT=3101
55
+
56
+ # --- Monitoring agent (standard for managed customer VPSs) ---
57
+ MONITOR_AGENT_IMAGE_TAG=registry.askexe.com/askexe/exe-monitor-agent:v0.9.3
58
+ MONITOR_HUB_URL=https://monitor.askexe.com
59
+ # Required: values copied from monitor.askexe.com when adding the Hygo/customer system.
60
+ MONITOR_AGENT_TOKEN=CHANGEME_MONITOR_AGENT_TOKEN_FROM_MONITOR_HUB
61
+ MONITOR_AGENT_KEY=CHANGEME_MONITOR_AGENT_PUBLIC_KEY_FROM_MONITOR_HUB
62
+ MONITOR_AGENT_LISTEN=:45876
63
+
64
+ # --- AskExe central monitoring hub ---
65
+ # Not included on customer VPSs. Hygo/customer deployments run exe-monitor-agent above, never the hub.
66
+
67
+ # --- License ---
68
+ # injected by deploy_client
69
+ EXE_LICENSE_KEY=CHANGEME_EXE_LICENSE_KEY
@@ -0,0 +1,164 @@
1
+ # Deployment persona warning
2
+
3
+ Customer VPS deployments (Hygo/High/etc.) must start from `.env.customer.example`. AskExe-owned control-plane variables live in `.env.askexe-control-plane.example` and must not be copied to customer VPSs.
4
+
5
+ # exe-os VPS stack — `deploy/compose/`
6
+
7
+ Full production stack for a single client VPS: CRM + wiki + gateway + exed
8
+ backed by Postgres, ClickHouse, and Redis. Pinned image tags, healthchecks on
9
+ every service, named volumes for persistence, and host-nginx-friendly port
10
+ publishing on `127.0.0.1`.
11
+
12
+ This is the **Lane A-2** deliverable from the v1.6 execution plan
13
+ (`exe/output/v16-execution-plan.md`). Pairs with **Lane A-1** Ansible roles
14
+ which provision the host and install nginx-tls; the `nginx-tls` role includes
15
+ the snippets at `../nginx/snippets/*.conf` from `/etc/nginx/snippets/`.
16
+
17
+ The standalone **gateway-only** compose at `deploy/docker-compose.yml` remains
18
+ unchanged; this directory is the full stack.
19
+
20
+ ---
21
+
22
+ ## Services
23
+
24
+ | Service | Image | Pin source | Internal port |
25
+ |----------------|-----------------------------------------------|------------------------|---------------|
26
+ | `crm-postgres` | `postgres:16.6-alpine` | hard-pinned | 5432 |
27
+ | `clickhouse` | `clickhouse/clickhouse-server:24.8.4.13-alpine` | hard-pinned | 8123 / 9000 |
28
+ | `redis` | `redis:7.4-alpine` | hard-pinned | 6379 |
29
+ | `exe-crm` | `${CRM_IMAGE_TAG}` | `.env` | 3000 |
30
+ | `exe-crm-worker` | `${CRM_IMAGE_TAG}` | `.env` | — |
31
+ | `exe-wiki` | `${WIKI_IMAGE_TAG}` | `.env` | 3001 |
32
+ | `exed` | `${EXED_IMAGE_TAG}` | `.env` | 8765 |
33
+ | `exe-gateway` | `${GATEWAY_IMAGE_TAG}` | `.env` | 3100 / 3101 |
34
+
35
+ DB minor pins reflect the LTS line per service. Bump in lockstep when the
36
+ upstream LTS rolls.
37
+
38
+ ## Networks
39
+
40
+ - `backend` (`10.42.0.0/24`) — every service. Inter-service traffic only.
41
+ - `frontend` (`10.43.0.0/24`) — apps that terminate user traffic
42
+ (`exe-crm`, `exe-wiki`, `exe-gateway`). DBs never join this net.
43
+
44
+ Apps publish their HTTP ports to `127.0.0.1` on the host so the host-installed
45
+ nginx (Lane A-1 `nginx-tls`) can reverse-proxy them. Override the host port via
46
+ `CRM_HOST_PORT` / `WIKI_HOST_PORT` / `GATEWAY_HTTP_HOST_PORT` /
47
+ `GATEWAY_WS_HOST_PORT` if you co-host multiple stacks.
48
+
49
+ ## Company Brain projection guard
50
+
51
+ `exed` is the only place in the stack that should project cloud/local memory
52
+ into exe-db Postgres. This is **VPS-only** behavior. Founder/customer laptops
53
+ remain SQLite + encrypted cloud sync only.
54
+
55
+ The stack enables projection explicitly with:
56
+
57
+ ```env
58
+ EXE_CLOUD_SYNC_TO_POSTGRES=true
59
+ DATABASE_URL=postgres://...
60
+ ```
61
+
62
+ Code must not infer Postgres projection from a local `~/exe-db` checkout or a
63
+ stray `DATABASE_URL`; both the explicit gate and the DB URL are required.
64
+
65
+ ## Volumes
66
+
67
+ `postgres_data`, `clickhouse_data`, `clickhouse_logs`, `redis_data`,
68
+ `crm_data`, `wiki_data`, `exed_data`, `gateway_data` — local driver, persisted
69
+ under `/var/lib/docker/volumes/exe-os_*`. Backups (Lane G, Wave 2) snapshot
70
+ these.
71
+
72
+ ---
73
+
74
+ ## Runbook
75
+
76
+ ### 1. Validate config (no secrets needed)
77
+
78
+ ```bash
79
+ cd deploy/compose/
80
+ cp .env.customer.example .env
81
+ docker compose -f docker-compose.yml config >/dev/null && echo OK
82
+ ```
83
+
84
+ This is the `48224c7` invariant: parse must succeed on a fresh clone with
85
+ `.env.example` copied verbatim. The `env_file: required: false` gate keeps
86
+ this true even without `.env`. CI should run the same command.
87
+
88
+ ### 2. Fill secrets
89
+
90
+ Edit `.env`. Replace every `CHANGEME_*` value. Set image tags to the versions
91
+ you want pinned for this client. Rotate secrets per the standard rotation
92
+ policy.
93
+
94
+ ### 3. Boot the stack
95
+
96
+ ```bash
97
+ docker compose -f docker-compose.yml up -d
98
+ docker compose -f docker-compose.yml ps
99
+ ```
100
+
101
+ DBs come up first; apps wait on `condition: service_healthy`. Expect ~60s to
102
+ fully healthy on a fresh VPS.
103
+
104
+ `exe-gateway` also expects `deploy/compose/gateway.json` to exist. This repo
105
+ ships a minimal checked-in config that env overrides can layer on top of.
106
+
107
+ ### 4. Wire host nginx
108
+
109
+ The Lane A-1 `nginx-tls` Ansible role drops `../nginx/snippets/*.conf` into
110
+ `/etc/nginx/snippets/` and renders per-host server blocks for
111
+ `crm.<client>.com`, `wiki.<client>.com`, `gateway.<client>.com` that
112
+ `include` the matching snippet. Reload nginx after `compose up -d`:
113
+
114
+ ```bash
115
+ sudo nginx -t && sudo systemctl reload nginx
116
+ ```
117
+
118
+ ### 5. Verify end-to-end
119
+
120
+ ```bash
121
+ curl -fsS https://crm.<client>.com/healthz # exe-crm
122
+ curl -fsS https://wiki.<client>.com/api/ping # exe-wiki
123
+ curl -fsS https://gateway.<client>.com/health # exe-gateway
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Out of scope (handled by other Wave-1/2 lanes)
129
+
130
+ - Ansible host provisioning + nginx-tls — Lane A-1 (tom1)
131
+ - Image build pipelines for `exe-crm` / `exe-wiki` / `exed` / `exe-gateway` —
132
+ consumers of the pinned tags; not built by this compose
133
+ - Daily backup cron — Lane G / I4 (Wave 2)
134
+ - Upgrade / rollback workflow — Lane K / I3 (Wave 2)
135
+
136
+ ## Stack manifest updates (v0.9)
137
+
138
+ Customer VPS updates use the self-hosted omnibus model: customers update one
139
+ Exe OS stack version, not individual repo versions. The stack manifest pins the
140
+ compatible image tags for CRM, Wiki, exed, Gateway, and monitor agent.
141
+
142
+ Dry-run a local manifest:
143
+
144
+ ```bash
145
+ exe-os stack-update \
146
+ --manifest ./deploy/stack-manifests/v0.9.json \
147
+ --compose-file ./deploy/compose/docker-compose.yml \
148
+ --env-file ./deploy/compose/.env.example \
149
+ --check
150
+ ```
151
+
152
+ Run on a customer VPS after reviewing breaking-change notices:
153
+
154
+ ```bash
155
+ exe-os stack-update \
156
+ --manifest https://update.askexe.com/v1/stack-manifest.json \
157
+ --allow-breaking whatsapp_relink_required \
158
+ --yes
159
+ ```
160
+
161
+ `stack-update` backs up the current `.env`, patches pinned image tags from the
162
+ manifest, runs `docker compose pull && docker compose up -d`, health-checks the
163
+ stack, writes `.exe-stack-lock.json`, and restores the previous `.env` if the
164
+ rollout fails.