summaryrefslogtreecommitdiffhomepage
path: root/public/v4/apps/teslamate.yml
blob: 0d95b0c1b481f182e8e11a2c4c568a21459b2488 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
captainVersion: 4
services:
    $$cap_appname-db:
        caproverExtra:
            notExposeAsWebApp: 'true'
        image: postgres:$$cap_POSTGRES_VERSION
        restart: always
        environment:
            POSTGRES_DB: $$cap_DATABASE_NAME
            POSTGRES_USER: $$cap_DATABASE_USER
            POSTGRES_PASSWORD: $$cap_DATABASE_PASS
        volumes:
            - $$cap_appname-db:/var/lib/postgresql/data
    $$cap_appname-grafana:
        caproverExtra:
            containerHttpPort: 3000
            websocketSupport: 'true'
        image: teslamate/grafana:$$cap_GRAFANA_VERSION
        restart: always
        environment:
            DATABASE_USER: $$cap_DATABASE_USER
            DATABASE_PASS: $$cap_DATABASE_PASS
            DATABASE_NAME: $$cap_DATABASE_NAME
            DATABASE_HOST: srv-captain--$$cap_appname-db
        volumes:
            - $$cap_appname-db:/var/lib/postgresql/data
        depends_on:
            - $$cap_appname-db
    $$cap_appname-mqtt:
        volumes:
            - $$cap_appname-mosquitto-conf:/mosquitto/config
            - $$cap_appname-mosquitto-data:/mosquitto/data
        restart: always
        caproverExtra:
            dockerfileLines:
                - FROM eclipse-mosquitto:2
                - CMD ["mosquitto", "-c", "/mosquitto-no-auth.conf"]
            notExposeAsWebApp: 'true'
    $$cap_appname:
        caproverExtra:
            containerHttpPort: 4000
            websocketSupport: 'true'
        image: teslamate/teslamate:$$cap_TESLAMATE_VERSION
        environment:
            ENCRYPTION_KEY: $$cap_SECRET_KEY
            DATABASE_USER: $$cap_DATABASE_USER
            DATABASE_PASS: $$cap_DATABASE_PASS
            DATABASE_NAME: $$cap_DATABASE_NAME
            DATABASE_HOST: srv-captain--$$cap_appname-db
            MQTT_HOST: srv-captain--$$cap_appname-mqtt
        volumes:
            - $$cap_appname-import:/opt/app/import
        depends_on:
            - $$cap_appname-db
caproverOneClickApp:
    displayName: TeslaMate
    description: A powerful, self-hosted data logger for your Tesla.
    isOfficial: true
    instructions:
        start: |-
            TeslaMate is a powerful self-hosted data logger for your Tesla.
        end: |-
            TeslaMate has been successfully deployed! It might take few moments before it's fully started.
            You can access it at `http://$$cap_appname.$$cap_root_domain` and connect your Tesla account.
            Visit `http://$$cap_appname-grafana.$$cap_root_domain` to access Grafana dashboard. (You can log in with the default login/password of admin/admin)

            Read more at `https://docs.teslamate.org/docs/installation/docker#usage` for further instructions and usage.

            **Important:** Please enable **HTTPS** and **WebSocket Support** before use.
            **Recommended:** Protect your `TeslaMate` app with **HTTP Basic Auth** in CapRover to prevent public access.
    variables:
        - id: $$cap_GRAFANA_VERSION
          label: Grafana | Version
          defaultValue: '1.28'
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/teslamate/grafana/tags
          validRegex: /^([^\s^\/])+$/
        - id: $$cap_TESLAMATE_VERSION
          label: Application | Version
          defaultValue: '1.28'
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/teslamate/teslamate/tags
          validRegex: /^([^\s^\/])+$/
        - id: $$cap_SECRET_KEY
          label: Application | Encryption
          defaultValue: $$cap_gen_random_hex(8)
          description: A secure key to encrypt your Tesla API tokens
          validRegex: /.{1,}/
        - id: $$cap_POSTGRES_VERSION
          label: Database | Version
          description: Check out their Docker page for the valid tags https://hub.docker.com/_/postgres/tags
          defaultValue: '15'
          validRegex: /.{1,}/
        - id: $$cap_DATABASE_NAME
          label: Database | Name
          defaultValue: teslamate
          description: Name of the PostgreSQL database.
          validRegex: /.{1,}/
        - id: $$cap_DATABASE_USER
          label: Database | User
          defaultValue: teslamate
          description: Username for the PostgreSQL database.
          validRegex: /.{1,}/
        - id: $$cap_DATABASE_PASS
          label: Database | Password
          description: Password of the PostgreSQL database user.
          defaultValue: $$cap_gen_random_hex(16)
          validRegex: /.{1,}/