Reconcile resolves secret_env for every catalog app before it checks the app is installed. Routstr's UPSTREAM_API_KEY reads llama-server's key, so a node without llama-server (archy-x250-beta) logged "required secret 'llama-server-api-key' is missing" on every pass. Mark the entry optional, as btcpay does for its LND secret. Installing Routstr still installs llama-server first (a declared dependency), so the key is present whenever Routstr runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
125 lines
3.9 KiB
YAML
125 lines
3.9 KiB
YAML
# Development candidate; not catalog-published or lifecycle-qualified.
|
|
app:
|
|
id: routstr
|
|
name: Routstr Provider
|
|
version: 0.5.0-archy3
|
|
upstream:
|
|
kind: github
|
|
repo: Routstr/routstr-core
|
|
description: >-
|
|
Private Cashu inference payment gateway for this node's llama-server.
|
|
Accepts the node wallet's mints and pays earnings out to the node wallet's
|
|
Lightning address. Mesh serving requires the authenticated FIPS gateway and
|
|
an explicit opt-in; installation does not publish it.
|
|
|
|
container:
|
|
build:
|
|
context: /opt/archipelago/docker/routstr
|
|
dockerfile: Dockerfile
|
|
tag: localhost/archy-routstr:0.5.0-archy3
|
|
network: archy-net
|
|
generated_secrets:
|
|
- name: routstr-admin-password
|
|
kind: hex32
|
|
secret_env:
|
|
- key: ADMIN_PASSWORD
|
|
secret_file: routstr-admin-password
|
|
# llama-server's generated key: the only credential for its private API.
|
|
# Optional only so that reconcile, which resolves secrets for every
|
|
# catalog app, does not fail on nodes without llama-server. Installing
|
|
# Routstr installs llama-server (a dependency) and its key first.
|
|
- key: UPSTREAM_API_KEY
|
|
secret_file: llama-server-api-key
|
|
optional: true
|
|
# The node wallet owns which mints are trusted and where earnings go.
|
|
# Re-applied on every start by archy-start.py (Routstr's saved settings
|
|
# would otherwise win after the first boot).
|
|
derived_env:
|
|
- key: CASHU_MINTS
|
|
template: "{{ECASH_MINTS}}"
|
|
- key: RECEIVE_LN_ADDRESS
|
|
template: "{{ECASH_LN_ADDRESS}}"
|
|
|
|
dependencies:
|
|
- app_id: llama-server
|
|
- storage: 2Gi
|
|
resources:
|
|
memory_limit: 1Gi
|
|
cpu_limit: 2
|
|
security:
|
|
capabilities: []
|
|
readonly_root: true
|
|
no_new_privileges: true
|
|
network_policy: isolated
|
|
|
|
ports:
|
|
- host: 8200
|
|
container: 8000
|
|
protocol: tcp
|
|
bind: 127.0.0.1
|
|
auth: local
|
|
|
|
volumes:
|
|
- type: bind
|
|
source: /var/lib/archipelago/routstr
|
|
target: /data
|
|
options: [rw]
|
|
- type: tmpfs
|
|
target: /tmp
|
|
tmpfs_options: rw,noexec,nosuid,size=128m
|
|
|
|
environment:
|
|
- DATABASE_URL=sqlite+aiosqlite:////data/keys.db
|
|
- ROUTSTR_SECRET_KEY_FILE=/data/routstr_secret.key
|
|
- MODELS_PATH=/data/models.json
|
|
- AUTO_GENERATE_NSEC=false
|
|
- ENABLE_ANALYTICS_SHARING=false
|
|
- HTTP_URL=
|
|
- ONION_URL=
|
|
- RELAYS=
|
|
- PRIMARY_MINT_URL=
|
|
- UPSTREAM_BASE_URL=http://llama-server:8080/v1
|
|
- UPSTREAM_5XX_RETRY_ATTEMPTS=0
|
|
# Below the node gateway's own limit. Routstr refunds an X-Cashu token
|
|
# when the upstream times out, but keeps it, saving no change, when its
|
|
# caller hangs up first, so the slowest answer must still end inside every
|
|
# outer timeout.
|
|
- UPSTREAM_READ_TIMEOUT=240
|
|
- ENABLE_PRICING_REFRESH=false
|
|
- ENABLE_MODELS_REFRESH=false
|
|
- ENABLE_MODEL_PATHS_REFRESH=false
|
|
- PROVIDERS_REFRESH_INTERVAL_SECONDS=0
|
|
# Install-default price for the llama-server alias ($1 / $2 per million
|
|
# prompt / completion tokens). Applied once; the operator's price wins.
|
|
# Name and context are re-stated every start and must match the model file
|
|
# and llama-server's --ctx-size (apps/llama-server/README.md).
|
|
- ARCHY_MODEL_ID=archy-llama
|
|
- ARCHY_MODEL_NAME=Qwen2.5 1.5B Instruct
|
|
- ARCHY_MODEL_CONTEXT=8192
|
|
- ARCHY_MODEL_MAX_COMPLETION=1024
|
|
- ARCHY_DEFAULT_PROMPT_USD_PER_TOKEN=0.000001
|
|
- ARCHY_DEFAULT_COMPLETION_USD_PER_TOKEN=0.000002
|
|
|
|
# Process health only; does not claim a model or mint is ready.
|
|
health_check:
|
|
type: tcp
|
|
endpoint: localhost:8000
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
interfaces:
|
|
main:
|
|
name: Private provider API
|
|
description: Host-local API; not a browser launch surface or public mesh endpoint.
|
|
type: api
|
|
port: 8200
|
|
protocol: http
|
|
path: /v1
|
|
|
|
metadata:
|
|
category: tools
|
|
tier: optional
|
|
author: Routstr
|
|
repo: https://github.com/Routstr/routstr-core
|