
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
It is worth starting up this documentation by stating that this module does not work alone, but it needs to interact with others (see here). For the sake of a generic view of the whole service, the reader might refer to e.g. https://gitlab.com/synchronicity-iot/parking-estimator, where we include and document all the stuff needed to deploy the parking flow estimator service
By means of the information retrieved from the different parking intensity context entities, this service will generate an estimation of the parking intensity flow in the short term (namely, in the next 15, 30, 45 or 60 minutes).
API Documentation (Apiary)
The parking-estimator is the consequence of the joint operation between various micro-services. We briefly outline each of them below:
The service relies on two different configuration files to work properly. For the sake of illustration, we show here some samples of how the should look like (it goes without saying that they are mere samples and some attributes must be changed):
Although one of them is already present in the image (it is ready-to-use as it is), there is another that handles private data (i.e. the tokens to access the different RZs context Brokers). Namely, this file is called auth.js and must be present within the /usr/src/app/configfolder; otherwise, the service will basically not behave normally. As a illustrative example, this is how the file should look like, where users have to tamper all the RZs that require an Oauth token:
These are the attributes that are to be changed by an user (all the rest should be left intact, or the whole system may not behave as expected).
config / api / subscriptions / endpoint config / orion / endpoint config / ai_prediction_module / endpoint
Where the subscriptions endpoint is where the RZs' *** CBs will deliver their notifications, meaning that it must be an accessible address. For the sake of illustration, an example could be http://your-host:3000, being this 3000 the port defined on the variable config / api /port.
NOTE: By default, ***, AI prediction engine and Elastic Search containers are deployed on the same host as the rest of the atomic service components. Therefore, their configuration might be left as they are).
config / orion / endpoint: 'http://orion:1026' config / ai_prediction_module / endpoint: 'http://ai-prediction-engine:5000'
We offer the possibility to modify the underlying CBs that we want to play around with. In config.js, we have the array config / rzs / brokers, where we can modify/add/remove new elements. Let's see an example and analyze the fields therein:
rzs: { brokers: [{ rz: 'Santander', orion_host: 'https://context.san.synchronicity-iot.eu', historic_host: 'https://historical.san.synchronicity-iot.eu', auth: true, // fiware_service: '', // fiware_servicepath: '', area: [ [-4.198940, 43.332055], [-3.369473, 43.686628] ], },
In case an OAuth2 based framework is in between you and the underlying ***s (RZs'), you can put (static for the moment) tokens. Though it is documented in the auth.js.sample file, here is the template to tweak:
auth.orion = { Santander: { key: 'header', //(example: 'X-Auth-Token) token: 'token' }, };
To run the service, it is only needed to run the following Docker command:
docker run -p HOST_PORT:3000 -v "$(pwd)/config":/usr/src/app/config --name="CONTAINER_NAME" synchronicityiot/parking-estimator-api
Where <host-port> is the listening port at the host and <container_name> will be the label of the container, Besides, as hinted above, users must include both config.js and auth.js files within the config folder. This is the part set after the -v option, where users have to specify the path to the auth.js file in their host machines.
The support for this baseline services can be request via the issue tracker https://gitlab.com/synchronicity-iot/parking-estimator/issues
This atomic service is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Please refer to gnu licenses for more information.
The software is released as it is and we discharge any liability.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务