# yaml-language-server: $schema=https://cubeship.dev/schema/template/v1.json version: 1 name: 'Jian' minCubeship: ">=0.14.0-rc.1" project: jian inputs: - key: domain type: domain label: Where the gateway and its panel answer - key: apiToken type: secret label: The token you sign in with generate: 48 - key: masterKey type: secret label: The key the vault encrypts credentials with help: Keep a copy outside the database backups. Without it, a restored backup cannot open a single stored credential. generate: 43 databases: - key: db name: jian-db engine: postgres version: "17" database: jian limits: { cpu: 1, memory: 1Gi } apps: - key: gateway name: jian image: ghcr.io/lucasaarch/jian-gateway tag: "1.15.0" # The API, the agents and the workers. No domain: the web app is the way in. port: 4310 # The one route that answers without the token. internal_ports: [4310] health_checks: - path: /health port: 4310 attach: # Writes DATABASE_URL, which is all Jian reads. It migrates on start. - database: db volumes: # The agents' workbench: tools installed per user, SSH keys, and Git and # gh logins. Everything else Jian keeps is in the database. - path: /home/node limits: { cpu: 1, memory: 1Gi } env: JIAN_API_TOKEN: ${input.apiToken} # Where an MCP server that signs in with OAuth sends the owner back. JIAN_PUBLIC_URL: https://${input.domain} JIAN_ACTIVE_KEY_ID: v1 # Jian wants 32 bytes in base64: 43 characters and one `=`. Letters and # digits are all base64, so a generated 43-character secret is a key. JIAN_MASTER_KEYS: '{"v1":"${input.masterKey}="}' # Believe the client address, scheme and host the web app forwards, from # private addresses only: rate limits count per client and the panel # cookie is marked Secure. JIAN_TRUSTED_PROXIES: uniquelocal - key: web name: jian-web image: ghcr.io/lucasaarch/jian-web # Always the gateway's version. tag: "1.15.0" # The panel, which passes /v1, /health, /openapi.json and /jian-remote.mjs # on to the gateway, so webhooks, OAuth callbacks and workers keep one origin. port: 3000 # Its own liveness; /health is the gateway's. internal_ports: [3000] health_checks: - path: /web/health port: 3000 domains: - host: ${input.domain} limits: { cpu: 0.5, memory: 512Mi } env: JIAN_GATEWAY_URL: http://${app.gateway.internal}:${app.gateway.port}