Teslamate #4703
c-stoeckl
started this conversation in
Service Template Requests
Teslamate
#4703
Replies: 1 comment
-
For anyone else trying to do this, I currently have it working with the following compose file, using caddy as a reverse proxy in coolify: EDIT: Added health checks services:
teslamate:
image: 'teslamate/teslamate:latest'
restart: always
depends_on:
- database
environment:
- 'ENCRYPTION_KEY=${TM_ENCRYPTION_KEY}'
- 'DATABASE_USER=${TM_DB_USER}'
- 'DATABASE_PASS=${TM_DB_PASS}'
- 'DATABASE_NAME=${TM_DB_NAME}'
- DATABASE_HOST=database
- MQTT_HOST=mosquitto
- CHECK_ORIGIN=true
- 'TZ=${TM_TZ}'
- 'VIRTUAL_HOST=${FQDN_TM}'
volumes:
- './import:/opt/app/import'
cap_drop:
- ALL
healthcheck:
test: ["CMD-SHELL", "echo 'GET / HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n' | nc localhost 4000 | grep '200 OK'"]
interval: 5s
timeout: 30s
retries: 10
database:
image: 'postgres:17'
restart: always
environment:
- 'POSTGRES_USER=${TM_DB_USER}'
- 'POSTGRES_PASSWORD=${TM_DB_PASS}'
- 'POSTGRES_DB=${TM_DB_NAME}'
volumes:
- 'teslamate-db:/var/lib/postgresql/data'
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${TM_DB_USER} -d ${TM_DB_NAME}"]
interval: 5s
timeout: 30s
retries: 10
grafana:
image: 'teslamate/grafana:latest'
restart: always
environment:
- 'DATABASE_USER=${TM_DB_USER}'
- 'DATABASE_PASS=${TM_DB_PASS}'
- 'DATABASE_NAME=${TM_DB_NAME}'
- DATABASE_HOST=database
- 'GRAFANA_PASSWD=${GRAFANA_PW}'
- 'GF_SECURITY_ADMIN_USER=${GRAFANA_USER}'
- 'GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PW}'
- GF_AUTH_ANONYMOUS_ENABLED=false
- 'GF_SERVER_DOMAIN=${FQDN_TM}'
- 'GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s/grafana'
volumes:
- 'teslamate-grafana-data:/var/lib/grafana'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"] # Grafana's health check endpoint
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
mosquitto:
image: 'eclipse-mosquitto:2'
restart: always
command: 'mosquitto -c /mosquitto-no-auth.conf'
ports:
- '127.0.0.1:1883:1883'
volumes:
- 'mosquitto-conf:/mosquitto/config'
- 'mosquitto-data:/mosquitto/data'
healthcheck:
test: ['CMD', 'mosquitto_pub', '-h', 'localhost', '-t', '$SYS/health', '-m', 'check', '-q', '1']
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
volumes:
teslamate-db: null
teslamate-grafana-data: null
mosquitto-conf: null
mosquitto-data: null |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Teslamate is a powerful, self-hosted data logger for your Tesla.
It would be nice to have it as a similar deployment as mentioned in the advanced guide:
https://docs.teslamate.org/docs/guides/traefik
Docs: https://docs.teslamate.org
Repo: https://github.com/teslamate-org/teslamate
Beta Was this translation helpful? Give feedback.
All reactions