mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-13 14:52:16 +00:00
This major update transforms leggen from CLI-only to a web-ready architecture while maintaining full CLI compatibility. New Features: - FastAPI backend service (leggend) with comprehensive REST API - Background job scheduler with configurable cron (replaces Ofelia) - All CLI commands refactored to use API endpoints - Docker configuration updated for new services - API client with health checks and error handling API Endpoints: - /api/v1/banks/* - Bank connections and institutions - /api/v1/accounts/* - Account management and balances - /api/v1/transactions/* - Transaction retrieval with filtering - /api/v1/sync/* - Manual sync and scheduler configuration - /api/v1/notifications/* - Notification settings management CLI Enhancements: - New --api-url option and LEGGEND_API_URL environment variable - Enhanced sync command with --wait and --force options - Improved transactions command with --full and --limit options - Automatic fallback and health checking Breaking Changes: - compose.yml structure updated (leggend service added) - Ofelia scheduler removed (internal scheduler used instead) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
72 lines
2.0 KiB
YAML
72 lines
2.0 KiB
YAML
services:
|
|
# FastAPI backend service
|
|
leggend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.leggend
|
|
restart: "unless-stopped"
|
|
ports:
|
|
- "127.0.0.1:8000:8000"
|
|
volumes:
|
|
- "./leggen:/root/.config/leggen" # Configuration file directory
|
|
- "./db:/app" # Database storage
|
|
environment:
|
|
- LEGGEN_CONFIG_FILE=/root/.config/leggen/config.toml
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
# CLI for one-off operations (uses leggend API)
|
|
leggen:
|
|
image: elisiariocouto/leggen:latest
|
|
command: sync --wait
|
|
restart: "no"
|
|
volumes:
|
|
- "./leggen:/root/.config/leggen"
|
|
- "./db:/app"
|
|
environment:
|
|
- LEGGEND_API_URL=http://leggend:8000
|
|
depends_on:
|
|
leggend:
|
|
condition: service_healthy
|
|
|
|
nocodb:
|
|
image: nocodb/nocodb:latest
|
|
restart: "unless-stopped"
|
|
volumes:
|
|
- "./nocodb:/usr/app/data/"
|
|
- "./db:/usr/leggen:ro"
|
|
ports:
|
|
- "127.0.0.1:8080:8080"
|
|
depends_on:
|
|
leggend:
|
|
condition: service_healthy
|
|
|
|
# Optional: If you want to have a mongodb, uncomment the following lines
|
|
# mongo:
|
|
# image: mongo:7
|
|
# restart: "unless-stopped"
|
|
# # If you want to expose the mongodb port to the host, uncomment the following lines
|
|
# # ports:
|
|
# # - 127.0.0.1:27017:27017
|
|
# volumes:
|
|
# - "./data:/data/db"
|
|
# environment:
|
|
# MONGO_INITDB_ROOT_USERNAME: "leggen"
|
|
# MONGO_INITDB_ROOT_PASSWORD: "changeme"
|
|
|
|
# Optional: If you want to have an admin interface for your mongodb, uncomment the following lines
|
|
# mongo-express:
|
|
# image: mongo-express
|
|
# restart: "unless-stopped"
|
|
# # By default, we are exposing the mongo-express port to the host
|
|
# ports:
|
|
# - 127.0.0.1:8081:8081
|
|
# environment:
|
|
# ME_CONFIG_MONGODB_URL: "mongodb://leggen:changeme@mongo:27017/"
|
|
# ME_CONFIG_BASICAUTH_USERNAME: ""
|
|
# depends_on:
|
|
# - mongo
|