supplier+deploy/mainnet: optional OPENAI_API_KEY for DeepSeek (and other hosted OpenAI-compatible APIs)
Adds an optional OPENAI_API_KEY env var that supplier/src/openai.ts forwards as `Authorization: Bearer <key>`. Empty/unset preserves the ChatMock behaviour (no auth header). Unlocks pointing the openai backend at DeepSeek directly (https://api.deepseek.com) — no local proxy needed. New compose: deploy/mainnet/docker-compose.supplier-deepseek.yml (third mainnet supplier, model deepseek-v4-pro, mp-suppliers-deepseek.vector.apexfusion.org). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
81
deploy/mainnet/docker-compose.supplier-deepseek.yml
Normal file
81
deploy/mainnet/docker-compose.supplier-deepseek.yml
Normal file
@@ -0,0 +1,81 @@
|
||||
# deploy/mainnet/docker-compose.supplier-deepseek.yml — Supplier — MAINNET (DeepSeek backend)
|
||||
#
|
||||
# Third mainnet supplier. LLM_BACKEND=openai pointed directly at DeepSeek's
|
||||
# hosted API (OpenAI-compatible at https://api.deepseek.com). No local proxy
|
||||
# container — DeepSeek is reachable over public HTTPS.
|
||||
#
|
||||
# Coexists with:
|
||||
# - marketplace-mainnet-supplier (ollama / qwen3.6:35b, mp-suppliers.vector.apexfusion.org)
|
||||
# - marketplace-mainnet-supplier-gpt (openai / ChatMock, mp-suppliers-gpt.vector.apexfusion.org)
|
||||
#
|
||||
# Pre-flight:
|
||||
# 1. DNS A-record: mp-suppliers-deepseek.vector.apexfusion.org → host IP
|
||||
# 2. supplier/.env.deepseek written on host (chmod 600) with at minimum:
|
||||
# SUPPLIER_PRIV_KEY_HEX, OPENAI_API_KEY, OGMIOS_URL, NETWORK_ID=1,
|
||||
# VECTOR_ZERO_TIME_MS, ESCROW_REF_UTXO, ADVERT_REF_UTXO, ADVERT_REF,
|
||||
# LIVE_CHAIN=1
|
||||
# 3. Networks already exist (created by the canonical supplier compose):
|
||||
# docker network create marketplace-mainnet-net # one-shot
|
||||
# # traefik-net is created by the Traefik project
|
||||
|
||||
name: marketplace-mainnet-supplier-deepseek
|
||||
|
||||
services:
|
||||
supplier:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: supplier/Dockerfile
|
||||
container_name: marketplace-mainnet-supplier-deepseek
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
# Self-contained env for the DeepSeek variant — separate from
|
||||
# ../../supplier/.env (ollama-backed) and ../../supplier/.env.gpt
|
||||
# (ChatMock-backed). Holds this supplier's distinct SUPPLIER_PRIV_KEY_HEX,
|
||||
# ADVERT_REF, ADVERT_*, OPENAI_API_KEY, and the shared mainnet plumbing
|
||||
# duplicated in full (NETWORK_ID, OGMIOS_URL, VECTOR_ZERO_TIME_MS,
|
||||
# ref-script UTxOs, LIVE_CHAIN). No env_file ordering / override magic.
|
||||
- path: ../../supplier/.env.deepseek
|
||||
required: false
|
||||
environment:
|
||||
LLM_BACKEND: openai
|
||||
# No /v1 suffix — supplier/src/openai.ts appends /v1/chat/completions.
|
||||
OPENAI_BASE_URL: https://api.deepseek.com
|
||||
# DeepSeek reasoning generations can be slow; mirror the GPT compose.
|
||||
OPENAI_TIMEOUT_MS: "300000"
|
||||
PORT: "8080"
|
||||
# Enable LiveOgmiosProvider so submitTx/awaitTx actually broadcast.
|
||||
# Without this the supplier silently falls back to ReadOnlyOgmiosProvider
|
||||
# and Claim/Submit never reach chain.
|
||||
LIVE_CHAIN: "1"
|
||||
# NETWORK_ID and OGMIOS_URL intentionally not pinned here — they MUST
|
||||
# come from the operator-provided supplier/.env.deepseek on a mainnet host.
|
||||
# Setting them via compose would be a footgun: a stray re-up on
|
||||
# testnet hardware could silently re-tag the supplier as mainnet.
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/healthz >/dev/null || exit 1"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
networks:
|
||||
- marketplace-mainnet-net
|
||||
- traefik-net
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik-net"
|
||||
- "traefik.http.routers.mp-suppliers-deepseek-mainnet.entrypoints=web"
|
||||
- "traefik.http.routers.mp-suppliers-deepseek-mainnet.rule=Host(`mp-suppliers-deepseek.vector.apexfusion.org`)"
|
||||
- "traefik.http.services.mp-suppliers-deepseek-mainnet.loadbalancer.server.port=8080"
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
networks:
|
||||
marketplace-mainnet-net:
|
||||
external: true
|
||||
name: marketplace-mainnet-net
|
||||
traefik-net:
|
||||
external: true
|
||||
name: traefik-net
|
||||
Reference in New Issue
Block a user