feat(teslamate): Migrate to named volumes for persistence
Replaced direct host path volume mounts with named volumes for the Teslamate database, Grafana data, and Mosquitto configuration and data. This change centralizes the definition of host bind mounts for persistent data by using Docker named volumes with `driver_opts` set to `type: none` and `o: bind`. This improves consistency and manageability of volume definitions within the `docker-compose.yml` file. Additionally, the import volume path for the `teslamate` service was adjusted from `/mnt/docker/home/teslamate/data/import` to `/mnt/docker/home/teslamate/import`.
This commit is contained in:
@@ -12,7 +12,7 @@ services:
|
||||
# ports:
|
||||
# - 4000:4000
|
||||
volumes:
|
||||
- /mnt/docker/home/teslamate/data/import:/opt/app/import
|
||||
- /mnt/docker/home/teslamate/import:/opt/app/import
|
||||
cap_drop:
|
||||
- all
|
||||
secrets:
|
||||
@@ -29,7 +29,7 @@ services:
|
||||
- POSTGRES_PASSWORD=/run/secrets/password
|
||||
- POSTGRES_DB=teslamate
|
||||
volumes:
|
||||
- /mnt/docker/home/teslamate/data/postgresql:/var/lib/postgresql
|
||||
- teslamate-db:/var/lib/postgresql
|
||||
secrets:
|
||||
- password
|
||||
networks:
|
||||
@@ -46,7 +46,7 @@ services:
|
||||
# ports:
|
||||
# - 3000:3000
|
||||
volumes:
|
||||
- /mnt/docker/home/teslamate/data/grafana:/var/lib/grafana
|
||||
- teslamate-grafana-data:/var/lib/grafana
|
||||
secrets:
|
||||
- password
|
||||
networks:
|
||||
@@ -60,8 +60,8 @@ services:
|
||||
# ports:
|
||||
# - 1883:1883
|
||||
volumes:
|
||||
- /mnt/docker/home/teslamate/data/mosquitto/conf:/mosquitto/config
|
||||
- /mnt/docker/home/teslamate/data/mosquitto/data:/mosquitto/data
|
||||
- mosquitto-conf:/mosquitto/config
|
||||
- mosquitto-data:/mosquitto/data
|
||||
secrets:
|
||||
- password
|
||||
networks:
|
||||
@@ -76,3 +76,25 @@ networks:
|
||||
driver: overlay
|
||||
pangolin-home:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
teslamate-db:
|
||||
driver_opts:
|
||||
type: none
|
||||
device: /mnt/docker/home/teslamate/data
|
||||
o: bind
|
||||
teslamate-grafana-data:
|
||||
driver_opts:
|
||||
type: none
|
||||
device: /mnt/docker/home/teslamate/data
|
||||
o: bind
|
||||
mosquitto-conf:
|
||||
driver_opts:
|
||||
type: none
|
||||
device: /mnt/docker/home/teslamate/data
|
||||
o: bind
|
||||
mosquitto-data:
|
||||
driver_opts:
|
||||
type: none
|
||||
device: /mnt/docker/home/teslamate/data
|
||||
o: bind
|
||||
Reference in New Issue
Block a user