
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
The https://github.com/FIWARE-TMForum/Business-API-Ecosystem can be deployed with Docker using
two different approaches. On the one hand, for all the components that made up the Business API Ecosystem it has been
provided a Docker image that can be used jointly with docker-compose in order to deploy and configure the ecosystem.
On the other hand, this repo includes a single Docker image which already includes all the different Business API Ecosystem modules. NOTE: THIS OPTION HAS BEEN DEPRECATED, BEING THE LAST VERSION THE 6.4.0
The Business API Ecosystem requires instances of MySQL and MongoDB running. In this regard, you have three possibilities:
The Business API Ecosystem authenticates with the http://fiware-idm.readthedocs.io/en/latest/. In this regard, it is needed to register an application in this portal in order to acquire the OAuth2 credentials.
There you have to use the following info for registering the app:
As stated, it is possible to deploy the Business API Ecosystem using the Docker images available for each of the BAE
modules with docker-compose. In particular, the following images have to be deployed:
For deploying the BAE using this method the first step is creating a docker-compose.yml file with the following contents:
version: '3' services: mongo: image: mongo:3.2 restart: always networks: main: volumes: - ./mongo-data:/data/db mysql: image: mysql:5.7 restart: always volumes: - ./mysql-data:/var/lib/mysql networks: main: environment: - MYSQL_ROOT_PASSWORD=my-secret-pw - MYSQL_DATABASE=RSS charging: image: fiware/biz-ecosystem-charging-backend:develop links: - mongo depends_on: - mongo networks: main: aliases: - charging.docker ports: - 8006:8006 volumes: # - ./charging-settings:/business-ecosystem-charging-backend/src/user_settings # Used if the settings files are provided through the volume - ./charging-bills:/business-ecosystem-charging-backend/src/media/bills - ./charging-assets:/business-ecosystem-charging-backend/src/media/assets - ./charging-plugins:/business-ecosystem-charging-backend/src/plugins - ./charging-inst-plugins:/business-ecosystem-charging-backend/src/wstore/asset_manager/resource_plugins/plugins environment: - BAE_CB_PAYMENT_METHOD=None # Paypal or None (testing mode payment disconected) # - BAE_CB_PAYPAL_CLIENT_ID=client_id # - BAE_CB_PAYPAL_CLIENT_SECRET=client_secret # ----- Database configuration ------ - BAE_CB_MONGO_SERVER=mongo - BAE_CB_MONGO_PORT=27017 - BAE_CB_MONGO_DB=charging_db # - BAE_CB_MONGO_USER=user # - BAE_CB_MONGO_PASS=passwd # ----- Roles Configuration ----- - BAE_LP_OAUTH2_ADMIN_ROLE=admin - BAE_LP_OAUTH2_SELLER_ROLE=seller - BAE_LP_OAUTH2_CUSTOMER_ROLE=customer # ----- Email configuration ------ - BAE_CB_EMAIL=charging@email.com # - BAE_CB_EMAIL_USER=user # - BAE_CB_EMAIL_PASS=pass # - BAE_CB_EMAIL_SMTP_SERVER=smtp.server.com # - BAE_CB_EMAIL_SMTP_PORT=587 - BAE_CB_VERIFY_REQUESTS=True # Whether or not the BAE validates SSL certificates on requests to external components # ----- Site configuration ----- - BAE_SERVICE_HOST=http://proxy.docker:8004/ # External URL used to access the BAE - BAE_CB_LOCAL_SITE=http://charging.docker:8006/ # Local URL of the charging backend # ----- APIs Conection config ----- - BAE_CB_CATALOG=http://apis.docker:8080/DSProductCatalog - BAE_CB_INVENTORY=http://apis.docker:8080/DSProductInventory - BAE_CB_ORDERING=http://apis.docker:8080/DSProductOrdering - BAE_CB_BILLING=http://apis.docker:8080/DSBillingManagement - BAE_CB_RSS=http://rss.docker:8080/DSRevenueSharing - BAE_CB_USAGE=http://apis.docker:8080/DSUsageManagement - BAE_CB_AUTHORIZE_SERVICE=http://proxy.docker:8004/authorizeService/apiKeys proxy: image: fiware/biz-ecosystem-logic-proxy:develop links: - mongo depends_on: - mongo networks: main: aliases: - proxy.docker ports: - 8004:8000 volumes: # - ./proxy-conf:/business-ecosystem-logic-proxy/etc # To be used when congiguring the system with a config file provided in the volume - ./proxy-indexes:/business-ecosystem-logic-proxy/indexes - ./proxy-themes:/business-ecosystem-logic-proxy/themes - ./proxy-static:/business-ecosystem-logic-proxy/static - ./proxy-locales:/business-ecosystem-logic-proxy/locales environment: - NODE_ENV=development # Deployment in development or in production - COLLECT=True # Execute the collect static command on startup - BAE_LP_PORT=8000 # Port where the node service is going to run in the container - BAE_LP_HOST=proxy.docker # Host where the node service if going to run in the container # - BAE_SERVICE_HOST=https://store.lab.fiware.org/ # If provided, this URL specifies the actual URL that is used to access the BAE, when the component is proxied (e.g Apache) # - BAE_LP_HTTPS_ENABLED=true # If provided specifies whether the service is running in HTTPS, default: false # - BAE_LP_HTTPS_CERT=cert/cert.crt # Certificate for the SSL configuration (when HTTPS enabled is true) # - BAE_LP_HTTPS_CA=cert/ca.crt # CA certificate for the SSL configuration (when HTTPS enabled is true) # - BAE_LP_HTTPS_KEY=cert/key.key # Key sfile for the SSL configuration (when HTTPS enabled is true) # - BAE_LP_HTTPS_PORT=443 # Port where the service runs when SSL is enabled (when HTTPS enabled is true) # ------ OAUTH2 Config ------ - BAE_LP_OAUTH2_SERVER=http://idm.docker:3000 # URL of the FIWARE IDM used for user authentication - BAE_LP_OAUTH2_CLIENT_ID=e3d43e88-7049-434f-9824-2f0387d9860d # OAuth2 Client ID of the BAE applicaiton - BAE_LP_OAUTH2_CLIENT_SECRET=06c888d5-a17a-4386-9e26-8ee4f7f77135 # OAuth Client Secret of the BAE application - BAE_LP_OAUTH2_CALLBACK=http://proxy.docker:8004/auth/fiware/callback # Callback URL for receiving the access tokens - BAE_LP_OAUTH2_ADMIN_ROLE=admin # Role defined in the IDM client app for admins of the BAE - BAE_LP_OAUTH2_SELLER_ROLE=seller # Role defined in the IDM client app for sellers of the BAE - BAE_LP_OAUTH2_CUSTOMER_ROLE=customer # Role defined in the IDM client app for customers of the BAE - BAE_LP_OAUTH2_ORG_ADMIN_ROLE=orgAdmin # Role defined in the IDM client app for organization admins of the BAE - BAE_LP_OAUTH2_IS_LEGACY=false # Whether the used FIWARE IDM is version 6 or lower # - BAE_LP_THEME=theme # If provided custom theme to be used by the web site, it must be included in themes volume # ----- Mongo Config ------ # - BAE_LP_MONGO_USER=user # - BAE_LP_MONGO_PASS=pass - BAE_LP_MONGO_SERVER=mongo - BAE_LP_MONGO_PORT=27017 - BAE_LP_MONGO_DB=belp - BAE_LP_REVENUE_MODEL=30 # Default market owner precentage for Revenue Sharing models # ----- APIs Configuration ----- # If provided, it supports configuring the contection to the different APIs managed by the logic proxy, by default # apis.docker, charging.docker and rss.docker domains are configured # - BAE_LP_ENDPOINT_CATALOG_PATH=DSProductCatalog # - BAE_LP_ENDPOINT_CATALOG_PORT=8080 # - BAE_LP_ENDPOINT_CATALOG_HOST=apis.docker # - BAE_LP_ENDPOINT_CATALOG_SECURED=false # ... apis: image: fiware/biz-ecosystem-apis:develop restart: always ports: - 4848:4848 - 8080:8080 links: - mysql depends_on: - mysql networks: main: aliases: - apis.docker # volumes: # - ./apis-conf:/etc/default/tmf/ # Used if not configured by environment environment: - BAE_SERVICE_HOST=http://proxy.docker:8004/ - MYSQL_ROOT_PASSWORD=my-secret-pw - MYSQL_HOST=mysql rss: image: fiware/biz-ecosystem-rss:develop restart: always ports: - 9999:8080 - 4444:4848 - 1111:8181 links: - mysql depends_on: - mysql networks: main: aliases: - rss.docker # volumes: # - ./rss-conf:/etc/default/rss # Used if not configured by environment environment: - BAE_RSS_DATABASE_URL=jdbc:mysql://mysql:3306/RSS - BAE_RSS_DATABASE_USERNAME=root - BAE_RSS_DATABASE_PASSWORD=my-secret-pw - BAE_RSS_DATABASE_DRIVERCLASSNAME=com.mysql.jdbc.Driver - BAE_RSS_OAUTH_CONFIG_GRANTEDROLE=admin - BAE_RSS_OAUTH_CONFIG_SELLERROLE=seller - BAE_RSS_OAUTH_CONFIG_AGGREGATORROLE=Aggregator networks: main: external: true
The next step is providing all the configuration files or environment variables required by the different components. For details on how to configure the different components please refer to the https://business-api-ecosystem.readthedocs.io/en/develop/configuration-guide.html
It can be seen that the different images used as part of the Business API Ecosystem provide several volumes. Following it is descrived the diffent options provided by each image.
The biz-ecosystem-logic-proxy image defines 4 volumes. In particular:
config.js file with the software configurationAdditionally, the biz-ecosystem-logic-proxy image defines two environment variables intended to optimize the production deployment of the BAE Logic proxy:
On the other hand, the biz-ecosystem-charging-backend image defines 4 volumes. In particular:
Once you have created the files, run the following command:
docker-compose up
Then, the Business API Ecosystem should be up and running in http://YOUR_HOST:PORT/ replacing YOUR_HOST by the host of your machine and PORT by the port provided in the Business Ecosystem Logic Proxy configuration
Once the different containers are running, you can stop them using:
docker-compose stop
And start them again using:
docker-compose start
Additionally, you can terminate the different containers by executing:
docker-compose down
THIS OPTION HAS BEEN DEPRECATED, BEING THE LAST VERSION THE 6.4.0
It has been provided a stand alone BAE image which already includes all the modules installed.
This image can be deployed with docker-compose using the following docker-compose.yml file:
version: "3" services: mysql: image: mysql:latest ports: - "3333:3306" volumes: - ./mysql-data:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=my-secret-pw mongo: image: mongo:3.2 ports: - 27017:27017 volumes: - ./mongo-data:/data/db biz_ecosystem: image: fiware/business-api-ecosystem:6.4.0 ports: - "8004:8000" links: - mysql - mongo volumes: # Configuration files - ./conf/rss:/etc/default/rss - ./conf/charging:/business-ecosystem-charging-backend/src/user_settings - ./conf/proxy:/business-ecosystem-logic-proxy/etc # Charging volumes - ./charging-bills:/business-ecosystem-charging-backend/src/media/bills - ./charging-assets:/business-ecosystem-charging-backend/src/media/assets - ./charging-plugins:/business-ecosystem-charging-backend/src/plugins - ./charging-inst-plugins:/business-ecosystem-charging-backend/src/wstore/asset_manager/resource_plugins/plugins # Proxy volumes - ./proxy-indexes:/business-ecosystem-logic-proxy/indexes - ./proxy-themes:/business-ecosystem-logic-proxy/themes - ./proxy-static:/business-ecosystem-logic-proxy/static environment: - MYSQL_ROOT_PASSWORD=my-secret-pw - MYSQL_HOST=mysql - PAYPAL_CLIENT_ID=your-paypal-client-id - PAYPAL_CLIENT_SECRET=your-paypal-client-secret - NODE_ENV=development
The next step is providing all the configuration files required by the BAE using the configured volumes.
It is possible to find valid configuration files (as well as the docker-compose.yml) in the https://github.com/FIWARE-TMForum/Business-API-Ecosystem
As you can see, the BAE image include some environment variables to be configured. In particular:
For providing configuration files 3 volumes are used:
config.js file with the software configurationAdditionally, for the assets managed by the charging backend 4 volumes are used. In particular:
Finally, for the management of logic proxy indexes and themes 3 volumes are provided:
Once you have created the files, run the following command:
docker-compose up
Then, the Business API Ecosystem should be up and running in http://YOUR_HOST:PORT/ replacing YOUR_HOST by the host of your machine and PORT by the port provided in the Business Ecosystem Logic Proxy configuration
Once the different containers are running, you can stop them using:
docker-compose stop
And start them again using:
docker-compose start
Additionally, you can terminate the different containers by executing:
docker-compose down
New versions than 5.4.1 had changed the way configuration is provided. In this regard, the deployment of BAE images for the version 5.4.1 is done in a different way to the explained in the previous section.
To the deploy the BAE image v5.4.1, you must create a folder to place a new file file called docker-compose.yml that should include the following content:
biz_db: image: mysql:latest ports: - "3333:3306" volumes: - /var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=my-secret-pw biz_ecosystem: image: fiware/business-api-ecosystem ports: - "8000:8000" links: - biz_db volumes: - /your/bills/path:/apis/business-ecosystem-charging-backend/src/media/bills - /your/assets/path:/apis/business-ecosystem-charging-backend/src/media/assets - /your/plugins/path:/apis/business-ecosystem-charging-backend/src/plugins - /your/indexes/path:/apis/business-ecosystem-logic-proxy/indexes environment: - MYSQL_ROOT_PASSWORD=my-secret-pw - MYSQL_HOST=biz_db - OAUTH2_CLIENT_ID=your-client-id - OAUTH2_CLIENT_SECRET=your-client-secret - PAYPAL_CLIENT_ID=your-paypal-client-id - PAYPAL_CLIENT_SECRET=your-paypal-client-secret - ADMIN_EMAIL=your@email.com - EMAIL_USER=your - EMAIL_PASSWD=your-passwd - EMAIL_SERVER=smtp.gmail.com - EMAIL_SERVER_PORT=587 - BIZ_ECOSYS_PORT=your-port - BIZ_ECOSYS_HOST=your-host
Additionally, you can run the containers manually using the following commands:
sudo docker run --name biz_db -e MYSQL_ROOT_PASSWORD=my-secret-pw -p PORT:3306 -v /var/lib/mysql -d mysql
To Business API Ecosystem:
sudo docker run \ -e MYSQL_ROOT_PASSWORD=my-secret-pw \ -e MYSQL_HOST=rss_db \ -e OAUTH2_CLIENT_ID=your-oauth-client-id \ -e OAUTH2_CLIENT_SECRET=your-oauth-client-secret \ -e BIZ_ECOSYS_PORT=your-port \ -e BIZ_ECOSYS_HOST=your-host \ -e PAYPAL_CLIENT_ID=your-paypal-client-id \ -e PAYPAL_CLIENT_SECRET=your-paypal-client-secret \ -e ADMIN_EMAIL=your@email.com \ -p your-port:8000 --link biz_db fiware/business-api-ecosystem
Note in the previous commands, that it is needed to provide some environment variables. In particular:
Additionally, it is possible to provide some optional variables that enable the software sending email notifications:
Moreover, the Business API Ecosystem image defines 4 containers intended to persist and share some information. Specifically, the following volumes have been defined:
As you may know, the Business API Ecosystem is able to sell different types of digital assets by loading asset plugins in its Charging Backend. In this context, it is possible to install asset plugins in the current Docker image as follows:
Copy the plugin file into the host directory of the volume /business-ecosystem-charging-backend/src/plugins
Enter the running container:
docker exec -i -t your-container /bin/bash
cd /apis/business-ecosystem-charging-backend/src
./manage.py loadplugin ./plugins/pluginfile.zip
service apache2 restart
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务