欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 健康 > 养生 > Docker安装teslamate

Docker安装teslamate

2025/3/10 12:02:37 来源:https://blog.csdn.net/qq_37272999/article/details/141002910  浏览:    关键词:Docker安装teslamate

要求

  • Docker(如果不熟悉 Docker,请参阅安装 Docker 和 Docker Compose)
  • 一台始终开启的机器,因此 TeslaMate 可以持续获取数据
  • 计算机上至少有 1 GB 的 RAM 才能成功安装。
  • 外部互联网访问,与 tesla.com 交谈


创建一个名为以下内容的文件:docker-compose.yml

[root@csy-2210240119 test2]# vim docker-compose.yml grafana:image: teslamate/grafana:latestrestart: alwaysenvironment:- DATABASE_USER=teslamate- DATABASE_PASS=password- DATABASE_NAME=teslamate- DATABASE_HOST=databaseports:- 3000:3000volumes:- teslamate-grafana-data:/var/lib/grafanamosquitto:image: eclipse-mosquitto:2restart: alwayscommand: mosquitto -c /mosquitto/noauth.conf# Uncomment the line below if you want to expose the MQTT port# ports:#   - 1883:1883volumes:- mosquitto-conf:/mosquitto/config- mosquitto-data:/mosquitto/datavolumes:teslamate-db:teslamate-grafana-data:mosquitto-conf:mosquitto-data:
  1. 选择一个安全加密密钥,该密钥将用于加密您的 Tesla API 令牌(插入为 )。ENCRYPTION_KEY
  2. 选择您的安全数据库密码,并在每次出现 and 时插入它DATABASE_PASSPOSTGRES_PASSWORD
  3. 使用 启动 docker 容器。若要在后台运行容器,请添加以下标志:docker compose up-d

用法

  1. 打开 Web 界面 http://your-ip-address:4000
  2. 使用您的 Tesla 账户登录
  3. Grafana 仪表板位于 http://your-ip-address:3000。使用默认用户(初始密码)登录并输入安全密码。adminadmin
[root@csy-2210240119 test2]# docker-compose up -d 
Creating network "test2_default" with the default driver
Creating volume "test2_teslamate-db" with default driver
Creating volume "test2_teslamate-grafana-data" with default driver
Creating volume "test2_mosquitto-conf" with default driver
Creating volume "test2_mosquitto-data" with default driver
Pulling teslamate (teslamate/teslamate:latest)...
latest: Pulling from teslamate/teslamate
f11c1adaa26e: Pull complete
5dc7fa16ae16: Pull complete
fdc678bcf528: Pull complete
a6a78ef53b3d: Pull complete
3145d4af35ba: Pull complete
57dd574b0bfd: Pull complete
Digest: sha256:21b53b2490f88805a48c03998a1a307edfc908dec6323f5221097639bcb846bf
Status: Downloaded newer image for teslamate/teslamate:latest
Pulling database (postgres:16)...
16: Pulling from library/postgres
efc2b5ad9eec: Pull complete
b33c47d38f22: Pull complete
87cb89a22d1e: Pull complete
fd66d978bf1a: Pull complete
d1723030f70f: Pull complete
4ed8886da429: Pull complete
2c0a96a00eeb: Pull complete
224e967d7685: Pull complete
4774bf58af6a: Pull complete
5f45270309c1: Pull complete
60cb0fc6dcac: Pull complete
abcf585d57b0: Pull complete
87cb29313a81: Pull complete
2e7f0c5387bd: Pull complete
Digest: sha256:d0f363f8366fbc3f52d172c6e76bc27151c3d643b870e1062b4e8bfe65baf609
Status: Downloaded newer image for postgres:16
Pulling grafana (teslamate/grafana:latest)...
latest: Pulling from teslamate/grafana
4abcf2066143: Pull complete
90a5b5b688c9: Pull complete
b4d3df5fce20: Pull complete
7323f95dae0a: Pull complete
37e7a9762f6b: Pull complete
58a42d0fddd0: Pull complete
44e28e264aaf: Pull complete
f2fa4af3d6e2: Pull complete
2ca7067e7a0f: Pull complete
c9eeabca0418: Pull complete
73f4e886e7b2: Pull complete
79dc48c4848d: Pull complete
85a5834f7451: Pull complete
a68af531adff: Pull complete
2e04094360e9: Pull complete
ed8a60656a39: Pull complete
6da819cd0144: Pull complete
4f7c49c21dd0: Pull complete
Digest: sha256:8c44b15fa5c57989004ee935fbad21ae070d75457d8beb432d2adedb44802e38
Status: Downloaded newer image for teslamate/grafana:latest
Pulling mosquitto (eclipse-mosquitto:2)...
2: Pulling from library/eclipse-mosquitto
930bdd4d222e: Pull complete
085c6f8a3a47: Pull complete
3c10f08c3bc8: Pull complete
Digest: sha256:0dade801eb979962bcfebe7545296be24f4b25aad26df63e0140f6b2161471a2
Status: Downloaded newer image for eclipse-mosquitto:2
Creating test2_database_1  ... done
Creating test2_teslamate_1 ... done
Creating test2_grafana_1   ... done
Creating test2_mosquitto_1 ... done

访问测试

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词