feat: add autonomous Surplus seller

This commit is contained in:
david
2026-08-27 12:48:18 +02:00
parent 2b8409a499
commit 732de817aa
17 changed files with 3074 additions and 2 deletions

View File

@@ -82,13 +82,14 @@ project_re() {
docker-compose.buyer.yml) echo "^buyer/|$SHARED_RE" ;;
docker-compose.gateway.yml) echo "^gateway/|$SHARED_RE" ;;
docker-compose.wallet-monitor.yml) echo "^wallet-monitor/|$SHARED_RE" ;;
docker-compose.surplus-seller.yml) echo "^supplier/|$SHARED_RE" ;;
docker-compose.supplier*.yml) echo "^supplier/|$SHARED_RE" ;;
*) echo "" ;;
esac
}
# Restart order: infra first, suppliers last (each supplier drains first).
ORDERED_NON_SUPPLIER="docker-compose.indexer.yml docker-compose.buyer.yml docker-compose.gateway.yml docker-compose.wallet-monitor.yml docker-compose.ollama.yml docker-compose.chatmock.yml docker-compose.tts-piper.yml"
ORDERED_NON_SUPPLIER="docker-compose.indexer.yml docker-compose.buyer.yml docker-compose.gateway.yml docker-compose.wallet-monitor.yml docker-compose.surplus-seller.yml docker-compose.ollama.yml docker-compose.chatmock.yml docker-compose.tts-piper.yml"
SUPPLIERS=$(cd "$COMPOSE_DIR" && ls docker-compose.supplier*.yml)
AFFECTED=()

View File

@@ -0,0 +1,39 @@
name: marketplace-mainnet-surplus-seller
services:
surplus-seller:
build:
context: ../..
dockerfile: supplier/Dockerfile
container_name: marketplace-mainnet-surplus-seller
restart: unless-stopped
command:
- node_modules/.bin/tsx
- supplier/src/cli/surplus-seller.ts
env_file:
- path: /var/lib/agents-marketplace/surplus-seller.env
required: true
read_only: true
tmpfs:
- /tmp:size=64m,mode=1777
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
volumes:
- surplus-seller-state:/var/lib/surplus-manager
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/healthz >/dev/null || exit 1"]
interval: 20s
timeout: 5s
retries: 3
start_period: 60s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
volumes:
surplus-seller-state:
name: marketplace-mainnet-surplus-seller-state