Files
qwen-gate/docker-compose.yml
2026-06-11 22:47:44 +04:00

56 lines
2.0 KiB
YAML

services:
qwen-gate:
build: .
image: qwen-gate:latest
container_name: qwen-gate
restart: unless-stopped
# init reaps zombie Chromium child processes; shm_size gives the browser
# headroom (it runs with --disable-dev-shm-usage, but this avoids edge crashes).
init: true
shm_size: "1gb"
ports:
- "26405:26405"
# Configuration is env-driven: config.get() reads process.env first, so these
# take precedence over config.json (which is JSON-parsed and not shipped).
environment:
HOST: "0.0.0.0" # must bind all interfaces inside the container
PORT: "26405"
# API_KEY: "change-me" # require this bearer token on /v1/* (empty = open)
# BROWSER: "chromium" # default stealth engine (cloakbrowser)
# AUTOLOGIN: "false" # only affects the headed dashboard Login button,
# # which can't run in a container — see DEPLOYMENT.md
# # "Docker" caveat. Authenticate via stored credentials instead.
# STREAMING_MODE: "auto" # auto | stream | non-stream
# TOOL_CALLING: "true"
# CLEAN_OUTPUT: "true"
# RATE_LIMIT_COOLDOWN_MS: "120000"
volumes:
# Persistent login state — accounts.json + per-account browser profiles.
# This is what survives restarts so you don't re-authenticate every time.
- qwen-data:/app/.qwen
# Request / gateway logs.
- qwen-logs:/app/logs
# Optional: persist dashboard-edited settings. Create an empty, valid JSON
# file first (`echo {} > config.json`) or Docker will create a directory.
# - ./config.json:/app/config.json
healthcheck:
# Auth-independent TCP liveness check (works regardless of API_KEY).
test:
- "CMD"
- "node"
- "-e"
- "require('net').connect(26405,'127.0.0.1').on('connect',()=>process.exit(0)).on('error',()=>process.exit(1))"
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
volumes:
qwen-data:
qwen-logs: