@rizom/brain 0.2.0-alpha.7 → 0.2.0-alpha.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rizom/brain",
3
- "version": "0.2.0-alpha.7",
3
+ "version": "0.2.0-alpha.9",
4
4
  "description": "Brain runtime + CLI — scaffold, run, and manage AI brain instances",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,6 +12,11 @@
12
12
  }
13
13
  }
14
14
 
15
+ # Health endpoint
16
+ handle /health {
17
+ reverse_proxy localhost:3333
18
+ }
19
+
15
20
  # MCP endpoint
16
21
  handle /mcp* {
17
22
  reverse_proxy localhost:3333
@@ -45,11 +50,13 @@
45
50
  reverse_proxy localhost:3335
46
51
  }
47
52
 
48
- # Production site: proxy to webserver if running, otherwise serve
49
- # a minimal static fallback so the healthcheck and bare-domain
50
- # requests succeed even on the core preset (no webserver).
53
+ # Production site: prefer the webserver when present; otherwise fall back
54
+ # to the A2A interface so core-only deployments never return a bare 502.
51
55
  handle {
52
- reverse_proxy localhost:8080
56
+ reverse_proxy localhost:8080 localhost:3334 {
57
+ lb_policy first
58
+ lb_retries 1
59
+ }
53
60
 
54
61
  header {
55
62
  X-Frame-Options "SAMEORIGIN"
@@ -57,10 +64,4 @@
57
64
  Referrer-Policy "strict-origin-when-cross-origin"
58
65
  }
59
66
  }
60
-
61
- handle_errors {
62
- root * /srv/fallback
63
- try_files /index.html
64
- file_server
65
- }
66
67
  }
@@ -0,0 +1,40 @@
1
+ service: __SERVICE_NAME__
2
+ image: <%= ENV['IMAGE_REPOSITORY'] %>
3
+
4
+ servers:
5
+ web:
6
+ hosts:
7
+ - <%= ENV['SERVER_IP'] %>
8
+
9
+ proxy:
10
+ ssl:
11
+ certificate_pem: CERTIFICATE_PEM
12
+ private_key_pem: PRIVATE_KEY_PEM
13
+ hosts:
14
+ - <%= ENV['BRAIN_DOMAIN'] %>
15
+ - preview.<%= ENV['BRAIN_DOMAIN'] %>
16
+ app_port: 80
17
+ healthcheck:
18
+ path: /health
19
+
20
+ registry:
21
+ server: ghcr.io
22
+ username: <%= ENV['REGISTRY_USERNAME'] %>
23
+ password:
24
+ - KAMAL_REGISTRY_PASSWORD
25
+
26
+ builder:
27
+ arch: amd64
28
+
29
+ env:
30
+ clear:
31
+ NODE_ENV: production
32
+ secret:
33
+ - AI_API_KEY
34
+ - GIT_SYNC_TOKEN
35
+ - MCP_AUTH_TOKEN
36
+ - DISCORD_BOT_TOKEN
37
+
38
+ volumes:
39
+ - /opt/brain-data:/app/brain-data
40
+ - /opt/brain.yaml:/app/brain.yaml