
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://goreportcard.com/badge/github.com/KazanExpress/louis](https://goreportcard.com/report/github.com/KazanExpress/louis) https://img.shields.io/badge/License-MIT-brightgreen.svg](https://img.shields.io/badge/License-MIT-brightgreen.svg)  file passed to Louis. For now Louis, inserts all new transformations from file to postgres during application start. This way of configuring will be definitely changed in the future.
Each element in transformations of ensure-transforms.json describes transformation rule:
type - type of transform. For now it's either fill or fit
name field represents unique name of transformation, it will be used in uploaded image url for that transform
transformation will be applied to all new images which have same tag
width and height parameters for transformation (note that it's not necessarily final size of transformed image)
quality - compression parameter for transformations.
cropPoints - top left and bottom right points of area to extract. Can be used only with transformation of type crop.
For now list is very short, but it will be extended in future:
The image is resized so that it takes up as much space as possible within a bounding box defined by the given width and height parameters. The original aspect ratio is retained and all of the original image is visible.
Fills image to given width & height.
Extracts area from original image by given in request X/Y of top left and bottom right points.
Can limit one of the sides of the image and scaling the second according to aspect ratio.
Note: if both width and height are set, then image will be limited by width.
bashdocker run kexpress/louis
bash./louis --env=<default: .env | path to file with environment variables> \ --transforms-path=<default: ensure-transforms.json | path to file containing json description of transforms>
Louis is configured using environment variables or .env configs (see example.env)
List of available configuration options:
| Parameter | Description | Default | Required |
|---|---|---|---|
LOUIS_PUBLIC_KEY | Key used for uploading images | Yes | |
LOUIS_SECRET_KEY | Key used for claiming images | Yes | |
MAX_IMAGE_SIZE | Maximum size of image allowed to upload in bytes | 5242880(~5MB) | No |
MAX_ARCHIVE_SIZE | Maximum size of collection allowed to upload in bytes | 104857600(~100MB) | No |
CORS_ALLOW_ORIGIN | Allowed origins | * (allows all) | No |
CORS_ALLOW_HEADERS | Allowed headers | Authorization,Content-Type,Access-Content-Allow-Origin | No |
THROTTLER_QUEUE_LENGTH | Maximum number of parallel uploads Other requests will be queued and rejected after timeout | 10 | No |
THROTTLER_TIMEOUT | Queued request will be rejected after this delay with 503 status code | 15s | No |
MEMORY_WATCHER_ENABLED | if true then once in interval debug.FreeOsMemory() will be called if current RSS is more than limit | false | No |
MEMORY_WATCHER_LIMIT_BYTES | Maximum memory amount ignored by watcher in bytes | 1610612736 (1.5GB) | No |
MEMORY_WATCHER_CHECK_INTERVAL | 10m | No | |
CLEANUP_AFTER | Delay in time.Duration after which not claimed images will be deleted | 1m | No |
CLEANUP_POOL_CONCURRENCY | Number of concurrent cleanup gorutines | 10 | No |
S3_BUCKET | Name of S3 bucket | Yes | |
S3_ENDPOINT | By default AWS endpoint is used Should be set if another S3 compatible storage is used | AWS S3 | No |
S3_REGION | Region where S3 is stored | Yes | |
S3_ACCESS_KEY_ID | Your S3 access key ID | Yes | |
S3_SECRET_ACCESS_KEY | Your S3 secret key | Yes | |
POSTGRES_ADDRESS | PostgreSQL database address | 127.0.0.1:5432 | No |
POSTGRES_DATABASE | Database name | postgres | No |
POSTGRES_USER | postgres | No | |
POSTGRES_PASSWORD | "" | No | |
POSTGRES_SSL_MODE | To enable or disable https://www.postgresql.org/docs/9.1/libpq-ssl.html | disable | No |
JOBS_RETRY_DELAY | Time for which failed job is delayed before retrying | 30s | No |
JOBS_RETRIES_COUNT | Number of times job manager restarts failed jobs | 3 | No |
If you have problems with installing dependencies or building project. It's highly probably that they caused by https://github.com/h2non/bimg. Please check prerequisites and installation guides for these libs.
bash# libvips is needed in order to install bimg go get -v ./... go build ./cmd/louis ./louis
As you remember louis uses some databases for storing data. And they are needed during tests. You can easily run them from docker-compose:
bashcd build docker-compose up -d
Metrics are exposed in port 8001 and route /metrics.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务