When IPFS_PRIMARY=true:
- /api/run-recipe uses run_recipe_cid task
- Recipe registered on IPFS before execution
- Input CIDs fetched from cache manager
- Everything flows through IPFS, no local cache
Usage in docker-compose:
environment:
- IPFS_PRIMARY=true
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
121 lines
2.6 KiB
YAML
121 lines
2.6 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
redis:
|
|
image: redis:7-alpine
|
|
volumes:
|
|
- redis_data:/data
|
|
networks:
|
|
- celery
|
|
deploy:
|
|
replicas: 1
|
|
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
|
|
ports:
|
|
- "4001:4001" # Swarm TCP
|
|
- "4001:4001/udp" # Swarm UDP
|
|
volumes:
|
|
- ipfs_data:/data/ipfs
|
|
- l1_cache:/data/cache:ro # Read-only access to cache for adding files
|
|
networks:
|
|
- celery
|
|
- externalnet # For gateway access
|
|
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
|
|
# Set IPFS_PRIMARY=true to use IPFS-primary mode (everything on IPFS, no local cache)
|
|
# - IPFS_PRIMARY=true
|
|
# L2_SERVER, L2_DOMAIN, IPFS_GATEWAY_URL from .env file
|
|
volumes:
|
|
- l1_cache:/data/cache
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
- ipfs
|
|
networks:
|
|
- celery
|
|
- externalnet
|
|
deploy:
|
|
replicas: 1
|
|
restart_policy:
|
|
condition: on-failure
|
|
|
|
l1-worker:
|
|
image: git.rose-ash.com/art-dag/l1-server:latest
|
|
command: celery -A celery_app worker --loglevel=info -E
|
|
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:
|
|
replicas: 2
|
|
restart_policy:
|
|
condition: on-failure
|
|
|
|
flower:
|
|
image: mher/flower:2.0
|
|
command: celery --broker=redis://redis:6379/5 flower --port=5555
|
|
environment:
|
|
- CELERY_BROKER_URL=redis://redis:6379/5
|
|
- FLOWER_PORT=5555
|
|
depends_on:
|
|
- redis
|
|
networks:
|
|
- celery
|
|
- externalnet
|
|
deploy:
|
|
replicas: 1
|
|
restart_policy:
|
|
condition: on-failure
|
|
|
|
volumes:
|
|
redis_data:
|
|
postgres_data:
|
|
ipfs_data:
|
|
l1_cache:
|
|
|
|
networks:
|
|
celery:
|
|
driver: overlay
|
|
externalnet:
|
|
external: true
|