Files
novelly/deploy/qa/docker-compose.qa.yml
James Wampler bb2a499569
CI / build-and-push (push) Successful in 46s
CI / deploy (push) Successful in 9s
Expose Novelly API port + service-key auth for MCP access to QA deploy
MCP server is a stdio process run outside docker, pointed at the API
over HTTP via NOVELLY_API_URL. The api container previously had no
port mapping, so it was unreachable outside the compose network.
2026-08-21 09:42:10 -07:00

63 lines
1.8 KiB
YAML

name: novelly
# Persistent LAN deployment, pulled and recreated by CI on every push to main.
# Unlike a throwaway QA stack, this one keeps its data across deploys — `down` is run
# without `-v` and /data is a bind mount to /mnt/storage/apps/novelly/data on the host,
# not a docker-managed volume, so the author's novel data survives a redeploy.
services:
api:
image: ${API_IMAGE}:latest
container_name: novelly-api
restart: unless-stopped
environment:
ConnectionStrings__Novel: "Data Source=/data/novel.db"
Cors__Origins__0: "http://localhost:${WEB_PORT:-6173}"
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
Agent__Model: claude-sonnet-5
Agent__Effort: high
Imports__RootPath: /data/imports
Auth__ServiceApiKey: ${MCP_API_KEY:-}
volumes:
- /mnt/storage/apps/novelly/data:/data
networks:
- novelly
ports:
- "${API_PORT:-5080}:8080"
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8080/api/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
web:
image: ${WEB_IMAGE}:latest
container_name: novelly-web
restart: unless-stopped
depends_on:
api:
condition: service_healthy
networks:
- novelly
ports:
- "${WEB_PORT:-6173}:80"
# Preflight migration check, run by deploy.sh via `--profile tools run --rm migrate`
# against the newly pulled image before the running stack is touched. Excluded from
# `up -d` by the tools profile.
migrate:
image: ${API_IMAGE}:latest
command: ["dotnet", "Novelly.Api.dll", "--migrate-only"]
environment:
ConnectionStrings__Novel: "Data Source=/data/novel.db"
volumes:
- /mnt/storage/apps/novelly/data:/data
networks:
- novelly
profiles: ["tools"]
networks:
novelly:
name: novelly-net