Some checks are pending
offline / test (push) Waiting to run
Internal billing now uses verae.billing.* request-reply and pubs. zappier-account-balance tracks prepaid, credits, usage, and payments. Portal, admin, CS, and sales all review the same statement. Independent Forgejo repos stay split via push-module-repos.
179 lines
4.4 KiB
YAML
179 lines
4.4 KiB
YAML
# Lab / small-prod. NATS stays on the internal network (not published).
|
|
# Usage:
|
|
# MONOREPO=/path/to/master-zapier-plan-draft docker compose up --build
|
|
# or clone sibling repos next to this directory.
|
|
|
|
x-node: &node
|
|
restart: unless-stopped
|
|
networks: [verae]
|
|
|
|
services:
|
|
nats1:
|
|
image: nats:2.10-alpine
|
|
command:
|
|
- "--js"
|
|
- "--http_port=8222"
|
|
- "--cluster=nats://0.0.0.0:6222"
|
|
- "--cluster_name=verae"
|
|
- "--routes=nats://nats2:6222,nats://nats3:6222"
|
|
- "--name=nats1"
|
|
networks: [verae]
|
|
restart: unless-stopped
|
|
|
|
nats2:
|
|
image: nats:2.10-alpine
|
|
command:
|
|
- "--js"
|
|
- "--cluster=nats://0.0.0.0:6222"
|
|
- "--cluster_name=verae"
|
|
- "--routes=nats://nats1:6222,nats://nats3:6222"
|
|
- "--name=nats2"
|
|
networks: [verae]
|
|
restart: unless-stopped
|
|
|
|
nats3:
|
|
image: nats:2.10-alpine
|
|
command:
|
|
- "--js"
|
|
- "--cluster=nats://0.0.0.0:6222"
|
|
- "--cluster_name=verae"
|
|
- "--routes=nats://nats1:6222,nats://nats2:6222"
|
|
- "--name=nats3"
|
|
networks: [verae]
|
|
restart: unless-stopped
|
|
|
|
zappier-edge:
|
|
<<: *node
|
|
build:
|
|
context: ${MONOREPO:-..}/packages/zappier
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
PORT: "3000"
|
|
ZAPPIER_UPSTREAM: http://middleware:3100
|
|
NATS_URL: nats://nats1:4222
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on: [nats1, account-balance]
|
|
|
|
account-balance:
|
|
<<: *node
|
|
image: node:22-alpine
|
|
working_dir: /app
|
|
volumes:
|
|
- ${MONOREPO:-..}/packages/zappier-account-balance:/app
|
|
command: ["node", "src/server.js"]
|
|
environment:
|
|
PORT: "3010"
|
|
NATS_URL: nats://nats1:4222
|
|
ports:
|
|
- "3010:3010"
|
|
depends_on: [nats1]
|
|
|
|
customer-service:
|
|
<<: *node
|
|
image: node:22-alpine
|
|
working_dir: /app
|
|
volumes:
|
|
- ${MONOREPO:-..}/packages/zappier-customer-service:/app
|
|
command: ["node", "src/server.js"]
|
|
environment:
|
|
PORT: "3011"
|
|
ZAPPIER_ADMIN_URL: http://zappier-edge:3000
|
|
ACCOUNT_BALANCE_URL: http://account-balance:3010
|
|
NATS_URL: nats://nats1:4222
|
|
ports:
|
|
- "3011:3011"
|
|
depends_on: [zappier-edge, account-balance, nats1]
|
|
|
|
sales-pricing:
|
|
<<: *node
|
|
image: node:22-alpine
|
|
working_dir: /app
|
|
volumes:
|
|
- ${MONOREPO:-..}/packages/zappier-sales-pricing:/app
|
|
command: ["node", "src/server.js"]
|
|
environment:
|
|
PORT: "3012"
|
|
ZAPPIER_ADMIN_URL: http://zappier-edge:3000
|
|
ACCOUNT_BALANCE_URL: http://account-balance:3010
|
|
NATS_URL: nats://nats1:4222
|
|
ports:
|
|
- "3012:3012"
|
|
depends_on: [zappier-edge, account-balance, nats1]
|
|
|
|
accounting-export:
|
|
<<: *node
|
|
image: node:22-alpine
|
|
working_dir: /app
|
|
volumes:
|
|
- ${MONOREPO:-..}/packages/zappier-accounting-export:/app
|
|
command: ["node", "src/server.js"]
|
|
environment:
|
|
PORT: "3013"
|
|
ZAPPIER_ADMIN_URL: http://zappier-edge:3000
|
|
ACCOUNT_BALANCE_URL: http://account-balance:3010
|
|
NATS_URL: nats://nats1:4222
|
|
ports:
|
|
- "3013:3013"
|
|
depends_on: [zappier-edge, account-balance, nats1]
|
|
|
|
middleware:
|
|
<<: *node
|
|
build:
|
|
context: ${MONOREPO:-..}/packages/verae-zapier-middleware
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
PORT: "3100"
|
|
MOCK_VERAE: "true"
|
|
NATS_ENABLED: "true"
|
|
NATS_URL: nats://nats1:4222
|
|
ports:
|
|
- "3100:3100"
|
|
depends_on: [nats1, nats2, nats3]
|
|
|
|
archive-worm:
|
|
<<: *node
|
|
image: node:22-alpine
|
|
working_dir: /opt/fleet
|
|
volumes:
|
|
- ${MONOREPO:-..}/packages/verae-fleet:/opt/fleet
|
|
- ${MONOREPO:-..}/packages/verae-archive-worm:/opt/worm
|
|
- worm-data:/data
|
|
command: ["node", "src/worker.js"]
|
|
environment:
|
|
NATS_URL: nats://nats1:4222
|
|
FLEET_ROLE: archive-worm
|
|
FLEET_SERVICE: archive-worm
|
|
FLEET_HEALTH_BIND: 0.0.0.0
|
|
FLEET_HEALTH_PORT: "13500"
|
|
FLEET_STATE_DIR: /data
|
|
deploy:
|
|
replicas: 3
|
|
|
|
tree-node:
|
|
<<: *node
|
|
image: node:22-alpine
|
|
working_dir: /opt/fleet
|
|
volumes:
|
|
- ${MONOREPO:-..}/packages/verae-fleet:/opt/fleet
|
|
- ${MONOREPO:-..}/packages/verae-tree-node:/opt/tree
|
|
- tree-data:/data
|
|
command: ["node", "src/worker.js"]
|
|
environment:
|
|
NATS_URL: nats://nats1:4222
|
|
FLEET_ROLE: tree-node
|
|
FLEET_SERVICE: tree-node
|
|
FLEET_HEALTH_BIND: 0.0.0.0
|
|
FLEET_HEALTH_PORT: "13600"
|
|
FLEET_STATE_DIR: /data
|
|
deploy:
|
|
replicas: 3
|
|
|
|
networks:
|
|
verae:
|
|
driver: bridge
|
|
internal: false
|
|
|
|
volumes:
|
|
worm-data:
|
|
tree-data:
|