Add PostgreSQL + IPFS backend, rename configs to recipes

- Add PostgreSQL database for cache metadata storage with schema for
  cache_items, item_types, pin_reasons, and l2_shares tables
- Add IPFS integration as durable backing store (local cache as hot storage)
- Add postgres and ipfs services to docker-compose.yml
- Update cache_manager to upload to IPFS and track CIDs
- Rename all config references to recipe throughout server.py
- Update API endpoints: /configs/* -> /recipes/*
- Update models: ConfigStatus -> RecipeStatus, ConfigRunRequest -> RecipeRunRequest
- Update UI tabs and pages to show Recipes instead of Configs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gilesb
2026-01-08 14:58:29 +00:00
parent 4639a98231
commit ba244b9ebc
6 changed files with 938 additions and 212 deletions

View File

@@ -12,18 +12,49 @@ services:
restart_policy:
condition: on-failure
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_USER=artdag
- POSTGRES_PASSWORD=artdag
- POSTGRES_DB=artdag
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- celery
deploy:
replicas: 1
restart_policy:
condition: on-failure
ipfs:
image: ipfs/kubo:latest
volumes:
- ipfs_data:/data/ipfs
- l1_cache:/data/cache:ro # Read-only access to cache for adding files
networks:
- celery
deploy:
replicas: 1
restart_policy:
condition: on-failure
l1-server:
image: git.rose-ash.com/art-dag/l1-server:latest
env_file:
- .env
environment:
- REDIS_URL=redis://redis:6379/5
- DATABASE_URL=postgresql://artdag:artdag@postgres:5432/artdag
- IPFS_API=/dns/ipfs/tcp/5001
- CACHE_DIR=/data/cache
# L2_SERVER and L2_DOMAIN from .env file
volumes:
- l1_cache:/data/cache
depends_on:
- redis
- postgres
- ipfs
networks:
- celery
- externalnet
@@ -37,12 +68,16 @@ services:
command: celery -A celery_app worker --loglevel=info
environment:
- REDIS_URL=redis://redis:6379/5
- DATABASE_URL=postgresql://artdag:artdag@postgres:5432/artdag
- IPFS_API=/dns/ipfs/tcp/5001
- CACHE_DIR=/data/cache
- C_FORCE_ROOT=true
volumes:
- l1_cache:/data/cache
depends_on:
- redis
- postgres
- ipfs
networks:
- celery
deploy:
@@ -52,6 +87,8 @@ services:
volumes:
redis_data:
postgres_data:
ipfs_data:
l1_cache:
networks: