The Teslamate internal network definition in `docker-compose.yml` has been updated. The network was renamed from `teslamate-internal` to `teslamate`. It was also changed from an internally defined `overlay` network to an `external: true` network. This change allows Teslamate to connect to a pre-existing or centrally managed Docker network, improving integration with other services or a Docker Swarm environment.
82 lines
1.7 KiB
YAML
82 lines
1.7 KiB
YAML
services:
|
|
teslamate:
|
|
image: teslamate/teslamate:latest
|
|
restart: always
|
|
environment:
|
|
- ENCRYPTION_KEY=/run/secrets/password
|
|
- DATABASE_USER=teslamate
|
|
- DATABASE_PASS=/run/secrets/password
|
|
- DATABASE_NAME=teslamate
|
|
- DATABASE_HOST=database
|
|
- MQTT_HOST=mosquitto
|
|
ports:
|
|
- 4000:4000
|
|
volumes:
|
|
- /mnt/docker/home/teslamate/import:/opt/app/import
|
|
cap_drop:
|
|
- all
|
|
secrets:
|
|
- password
|
|
networks:
|
|
- teslamate
|
|
# - pangolin-home
|
|
|
|
database:
|
|
image: postgres:18-trixie
|
|
restart: always
|
|
environment:
|
|
- POSTGRES_USER=teslamate
|
|
- POSTGRES_PASSWORD=/run/secrets/password
|
|
- POSTGRES_DB=teslamate
|
|
volumes:
|
|
- teslamate-db:/var/lib/postgresql
|
|
secrets:
|
|
- password
|
|
networks:
|
|
- teslamate
|
|
|
|
grafana:
|
|
image: teslamate/grafana:latest
|
|
restart: always
|
|
environment:
|
|
- DATABASE_USER=teslamate
|
|
- DATABASE_PASS=/run/secrets/password
|
|
- DATABASE_NAME=teslamate
|
|
- DATABASE_HOST=database
|
|
ports:
|
|
- 3000:3000
|
|
volumes:
|
|
- teslamate-grafana-data:/var/lib/grafana
|
|
secrets:
|
|
- password
|
|
networks:
|
|
- teslamate
|
|
# - pangolin-home
|
|
|
|
mosquitto:
|
|
image: eclipse-mosquitto:2
|
|
restart: always
|
|
command: mosquitto -c /mosquitto-no-auth.conf
|
|
ports:
|
|
- 1883:1883
|
|
volumes:
|
|
- mosquitto-conf:/mosquitto/config
|
|
- mosquitto-data:/mosquitto/data
|
|
secrets:
|
|
- password
|
|
networks:
|
|
- teslamate
|
|
|
|
secrets:
|
|
password:
|
|
external: true
|
|
|
|
networks:
|
|
teslamate:
|
|
external: true
|
|
|
|
volumes:
|
|
teslamate-db:
|
|
teslamate-grafana-data:
|
|
mosquitto-conf:
|
|
mosquitto-data: |