Using Docker
-
Install Docker on your device.
-
Pull image:
docker pull silianz/python-openbmclapi:latest
infoYou can also pull with mirror sources:
docker pull registry.cn-hangzhou.aliyuncs.com/silianz/python-openbmclapi:latest
-
Create a container:
docker run -d \
-v /path/to/your/cache:/opt/python-openbmclapi/bmclapi \
-e cluster.id=${cluster.id} \
-e cluster.secret=${cluster.secret} \
-e cluster.public_port=${cluster.public_port} \
-p ${cluster.public_port}:8080 \
--restart always \
--name python-openbmclapi \
silianz/python-openbmclapiParameter description:
cluster.public_port
- Port open to others.cluster.id
- i.e. CLUSTER_ID.cluster.secret
- i.e. CLUSTER_SECRET.
For other configuration parameters, see Configuration File. Use Namespace ID to pass the corresponding configurations into the Docker container as environment variables.
In certain specific cases, you may not be able to transfer some configuration parameters into the container. You can try to mount the configuration file by adding this parameter to the command:
-v /path/to/your/config/file:/opt/python-openbmclapi/config/config.yml
Namespace ID is a way to pass configuration parameters into a Docker container.
dashboard:
password: ""
username: admin
websocket: true
This is an example configuration parameter. If we want to convert these configurations into Namespace ID, it will be like this:
dashboard.password=""
dashboard.user=admin
dashboard.websocker=true
Use .
to connect the key and value of the configuration parameter when converting the configuration to a Namespace ID.