Added mosquitto

This commit is contained in:
2025-06-14 09:25:46 +02:00
parent 2ab58a1a4e
commit e76c7edc6a
5 changed files with 22 additions and 2 deletions

View File

@@ -1,4 +1,12 @@
services:
mosquitto:
image: eclipse-mosquitto
ports:
- 1883:1883
volumes:
- ${REPO_DIR}/home-server/mosquitto/config:/mosquitto/config:rw
- ${STORAGE_DIR}/mosquitto/data:/mosquitto/data:rw
- ${STORAGE_DIR}/mosquitto/log:/mosquitto/log:rw
traefik:
restart: unless-stopped
image: traefik:v3.2
@@ -84,8 +92,8 @@ services:
- traefik.http.routers.prometheus.rule=Host(`prometheus.pladijs`)
- traefik.http.services.prometheus.loadbalancer.server.port=9090
volumes:
- ${REPO_DIR}/configurations/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ${STORAGE_DIR}/prometheus:/prometheus
- ${REPO_DIR}/configurations/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ${STORAGE_DIR}/prometheus:/prometheus:rw
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'

View File

@@ -0,0 +1,8 @@
allow_anonymous false
listener 1883
listener 9001
protocol websockets
persistence true
password_file /mosquitto/config/pwfile
persistence_file mosquitto.db
persistence_location /mosquitto/data/

View File

@@ -0,0 +1 @@
admin:$7$101$kEph6X+U4i2qdSC5$Osz6gdmEmkLtO4ek0eGRBWzJpuaA6CcLImyPaGs13TWkKopFNUWCtHUDzyZ1U55yhFzIADhe0ppncJCFMlg5lQ==

View File

@@ -53,6 +53,9 @@ async function hotCopy(
) {
const timestamp = moment().format("YYYY-MM-DD_HH-mm-ss"); // Return today's date time
// Make sure user has access to all folders
await $`sudo chown -R willem:willem /etc/homeassistant`;
log.info("Creating new copy");
await $`mkdir -p ${targetFolder}`;
// Sync new copy