Docker Service¶
Service Name¶
fatbot-accounting
Current Setup¶
The accounting service runs inside the TradingDesk docker-compose.yml using node:22-alpine. It installs dependencies at startup and runs the Express server.
# docker-compose.yml (current)
accounting:
image: node:22-alpine
container_name: fatbot-accounting
working_dir: /app
command: sh -c "npm install --production && node src/server.js"
volumes:
- ./accounting:/app
expose:
- "3100"
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3100/api/health"]
interval: 30s
timeout: 5s
retries: 3
restart: unless-stopped
Planned Dockerfile¶
When ready for production, create accounting/Dockerfile:
FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
EXPOSE 3100
CMD ["node", "src/server.js"]
Then update docker-compose to use build: ./accounting instead of the current inline setup.
Domain Routing¶
Currently commented out in the Caddyfile — enable when accounting.fatbot.ai DNS record is created:
accounting.fatbot.ai {
reverse_proxy accounting:3100
}
Ports¶
| Service | Port | Domain | Status |
|---|---|---|---|
| FATBot Dashboard | 8000 | fatbot.ai | Live |
| FATBot Docs | 8001 | docs.fatbot.ai | Live |
| fatbot-accounting | 3100 | accounting.fatbot.ai | Running (no DNS yet) |
| TradingView MCP | stdio | (not networked) | Running |
Data Persistence¶
SQLite database stored in accounting/data/accounting.db. The volume is bind-mounted, so data persists across container restarts.
Backup:
docker cp fatbot-accounting:/app/data/accounting.db ./backup/
Health Check¶
GET /api/health → { "status": "ok", "service": "fatbot-accounting", "currency": "GBP" }