Files
archived-teslamate-cn-image/README.md
T
yekk df58fd3b2b Update README with Mytess app recommendation
Added recommendation for Teslamate iOS app Mytess and updated features section.
2026-01-22 19:54:12 +08:00

157 lines
6.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- README.md -->
# 🇨🇳 TeslaMate-CN-Docker
[![Docker Version](https://img.shields.io/badge/docker-%3E%3D%2020.10-brightgreen)](https://docs.docker.com/)
[![Map Proxy](https://img.shields.io/badge/map-proxy-brightgreen)](https://openstreetmap.org)
[![GitHub stars](https://img.shields.io/github/stars/gococonut/teslamate-cn-docker?style=social)](https://github.com/yourname/teslamate-cn-docker)
> 中国大陆可用的 TeslaMate 容器化方案 Teslamate 汉化 Teslamate 中文| TeslaMate Docker Solution for Mainland China
> [镜像 Repository](https://github.com/gococonut/teslamate)
**强烈推荐** Teslamate iOS app:[Mytess](https://mytess.net)
## 🌟 特性 Features
* ✅ ​**完整汉化** - 界面全面中文化(汉化中)
* 🗺️ ​**地图访问** - 内置代理服务器解决 OpenStreetMap 访问问题
* 🗺️ ​**百度地图** - 支持百度地址逆地址解析,车辆位置信息更精准
* 🐳 ​**一键部署** - Docker Compose 一键部署
## 🚀 快速启动 Quick Start
### 本地内网部署步骤 Deployment
本项目提供两种部署方式:
| 版本 | 文件 | 说明 |
|------|------|------|
| **普通版本** | `docker-compose.yml` | 基础版本,包含 TeslaMate + Grafana |
| **Mytesla 版本** | `docker-compose-with-mytesla.yml` | 集成 Mytesla Dash,现代化看板替代 Grafana |
---
## 📊 Mytesla Dash - Grafana 替代方案
[Mytesla Dash](https://dash.mytesla.cc) 是一个现代化的 Tesla 数据看板,可以完美替代 Grafana 作为日常使用的数据展示界面。
### 为什么选择 Mytesla Dash?
- **现代化 UI** - 简洁美观的界面设计,移动端友好
- **开箱即用** - 无需复杂的 Grafana 仪表盘配置
- **实时监控** - 车辆状态、充电进度实时展示
- **数据分析** - 行程记录、能耗统计、充电费用一目了然
- **地理围栏** - 支持自定义地理围栏,自动识别充电地点
- **分时计费** - 峰谷电价自动计算,精确统计充电成本
### 授权说明
> **注意**:Mytesla Dash 需要一次性授权才能使用,首次访问时会引导完成授权流程。
>
> 获取授权码:[小红书 Mytesla 授权](https://www.xiaohongshu.com/goods-detail/688dbe5f02d7b00001179ed2)
### 界面预览
<!-- 图片1: Dashboard 主界面 -->
![Dashboard 主界面](images/923shots_so.png)
<!-- 图片2: 记录 -->
![记录](images/650shots_so.png)
<!-- 图片3: 充电统计 -->
![统计](images/148shots_so.png)
---
## 🔐 反向代理与认证安全
`docker-compose-with-mytesla.yml` 采用 **Traefik + ForwardAuth** 架构,提供企业级的安全防护:
### 架构说明
```
┌─────────────────────────────────────────────────────────────┐
│ 用户请求 │
└─────────────────────────┬───────────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────────┐
│ Traefik (反向代理) │
│ - 统一入口 (端口 80) │
│ - 路由分发 │
│ - 中间件处理 │
└─────────────────────────┬───────────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────────┐
│ Auth Service (认证服务) │
│ - Cookie-based 会话认证 │
│ - 登录/登出管理 │
│ - ForwardAuth 中间件 │
└─────────────────────────┬───────────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────────┐
│ 后端服务 │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │TeslaMate │ │ Dash │ │ Grafana │ │ API │ │
│ │/teslamate│ │ / │ │ /grafana │ │ /panel │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
└─────────────────────────────────────────────────────────────┘
```
### 安全特性
| 组件 | 作用 |
|------|------|
| **Traefik** | 反向代理,统一管理所有服务的入口,隐藏内部服务端口 |
| **Auth Service** | 提供统一的登录认证,保护敏感数据不被未授权访问 |
| **ForwardAuth** | 每个请求都会先经过认证服务验证,确保只有登录用户才能访问 |
| **路径隔离** | 不同服务使用不同路径,互不干扰 |
### 访问路径
- `/` - Mytesla Dash 主界面(需要登录)
- `/teslamate` - TeslaMate 管理界面(需要登录)
- `/grafana` - Grafana 仪表盘
- `/login` - 登录页面
- `/logout` - 登出
- `/settings` - 设置页面
---
## 🚀 部署指南
### 方式一:普通版本(TeslaMate + Grafana)
```bash
# 克隆仓库
git clone https://github.com/gococonut/teslamate-cn-docker.git
cd teslamate-cn-docker
# 启动服务
docker compose up -d
```
### 方式二:Mytesla 版本(推荐)
```bash
# 克隆仓库
git clone https://github.com/gococonut/teslamate-cn-docker.git
cd teslamate-cn-docker
# 启动服务
docker compose -f docker-compose-with-mytesla.yml up -d
```
### 访问服务
- **普通版本**:
- TeslaMate: `http://your-ip:4000`
- Grafana: `http://your-ip:3000`
- **Mytesla 版本**:
- 统一入口: `http://your-ip` (默认跳转到 Dashboard)
- TeslaMate: `http://your-ip/teslamate`
- Grafana: `http://your-ip/grafana`
- 默认登录: 用户名 `admin` / 密码 `admin123`(可在 `http://your-ip/settings` 设置页面修改)