Add IPFS node to L2 for federated content storage
- Add IPFS container to docker-compose - Add ipfshttpclient dependency - Add ipfs_client.py module for IPFS operations - Add ipfs_cid field to Asset model and database schema - Pin content on L2 IPFS when assets are published/registered L2 now stores content on its own IPFS node, enabling federation - content remains available even if L1 goes down. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,17 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
ipfs:
|
||||
image: ipfs/kubo:latest
|
||||
volumes:
|
||||
- ipfs_data:/data/ipfs
|
||||
networks:
|
||||
- internal
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
l2-server:
|
||||
image: git.rose-ash.com/art-dag/l2-server:latest
|
||||
env_file:
|
||||
@@ -24,6 +35,7 @@ services:
|
||||
environment:
|
||||
- ARTDAG_DATA=/data/l2
|
||||
- DATABASE_URL=postgresql://artdag:${POSTGRES_PASSWORD:-artdag}@postgres:5432/artdag
|
||||
- IPFS_API=/dns/ipfs/tcp/5001
|
||||
# ARTDAG_DOMAIN, ARTDAG_USER, JWT_SECRET from .env file
|
||||
volumes:
|
||||
- l2_data:/data/l2 # Still needed for RSA keys
|
||||
@@ -32,6 +44,7 @@ services:
|
||||
- externalnet
|
||||
depends_on:
|
||||
- postgres
|
||||
- ipfs
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
@@ -40,6 +53,7 @@ services:
|
||||
volumes:
|
||||
l2_data:
|
||||
postgres_data:
|
||||
ipfs_data:
|
||||
|
||||
networks:
|
||||
internal:
|
||||
|
||||
Reference in New Issue
Block a user