
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
A lightweight web UI and API to send plain-text jobs to an Epson TM-T88IV receipt printer over USB or Ethernet. Includes job logging, status checks, and Docker-first setup.
bashnpm install npm run dev
Create .env from the example below and run the server. By default it ***ds to 127.0.0.1:3000.
Profiles are required for usb/ethernet. If you omit --profile, Compose will report "no service selected".
bashdocker compose --profile ethernet up --build
For USB, ensure device mappings match your host:
bashdocker compose --profile usb up --build
Use the published image instead of build: .:
bashdocker compose --profile ethernet pull docker compose --profile ethernet up -d
If the container fails with SQLITE_CANTOPEN, ensure the data volume is writable:
bashdocker compose --profile ethernet run --rm --user root receipty-ethernet \ sh -c "mkdir -p /app/data && chown -R node:node /app/data"
Config is driven by environment variables and an optional JSON file.
CONFIG_PATH=/config/receipty.json and mount it into the container.| Name | Required | Example | Notes |
|---|---|---|---|
PRINTER_MODE | Yes | ethernet | usb or ethernet |
APP_HOST | Yes | 127.0.0.1 | Require API key if 0.0.0.0 |
APP_PORT | Yes | 3000 | HTTP port |
API_KEY | Conditional | changeme | Required when exposed |
RATE_LIMIT_PER_MINUTE | No | 60 | Per IP |
MAX_CHARS | No | 1000 | Input limit |
FEED_LINES | No | 6 | Line feeds after text |
CUT_FEED_LINES | No | 3 | Extra line feeds before cutting |
CUT_MODE | No | partial | none partial full |
CONNECT_TIMEOUT_MS | No | 2000 | Ethernet |
WRITE_TIMEOUT_MS | No | 2000 | Ethernet/USB write |
DB_PATH | No | ./data/receipty.sqlite | SQLite file path |
CONFIG_PATH | No | /config/receipty.json | Optional JSON config file |
| Name | Required | Example | Notes |
|---|---|---|---|
USB_VENDOR_ID | Yes | 0x04B8 | Epson VID often |
USB_PRODUCT_ID | Yes | 0x0E15 | Varies by device |
USB_DEVICE_PATH | No | /dev/usb/lp0 | Optional override |
| Name | Required | Example | Notes |
|---|---|---|---|
PRINTER_HOST | Yes | 192.168.1.50 | IP or DNS |
PRINTER_PORT | No | 9100 | RAW printing |
POST /api/print { "text": "..." }POST /api/jobs/:id/reprintGET /api/statusGET /api/jobs?page=1&pageSize=20GET /healthzGET /readyzIf APP_HOST is not localhost, include X-API-Key in API requests.
bashnpm run test npm run build npm start
escpos-usb by default and will fall back to writing the raw payload to USB_DEVICE_PATH when provided./dev/bus/usb first; only use privileged: true as a last resort.您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务