diff --git a/home-server/docker-compose.yml b/home-server/docker-compose.yml index 6643ea6..8fe8fbe 100644 --- a/home-server/docker-compose.yml +++ b/home-server/docker-compose.yml @@ -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' diff --git a/home-server/mosquitto/config/mosquitto.conf b/home-server/mosquitto/config/mosquitto.conf new file mode 100644 index 0000000..d666146 --- /dev/null +++ b/home-server/mosquitto/config/mosquitto.conf @@ -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/ diff --git a/home-server/mosquitto/config/pwfile b/home-server/mosquitto/config/pwfile new file mode 100644 index 0000000..d077fcd --- /dev/null +++ b/home-server/mosquitto/config/pwfile @@ -0,0 +1 @@ +admin:$7$101$kEph6X+U4i2qdSC5$Osz6gdmEmkLtO4ek0eGRBWzJpuaA6CcLImyPaGs13TWkKopFNUWCtHUDzyZ1U55yhFzIADhe0ppncJCFMlg5lQ== diff --git a/home-server/systemd/recurring-tasks/homeassistant-backup/homeassistant-backup b/home-server/systemd/recurring-tasks/homeassistant-backup/homeassistant-backup index cb0d0ec..ec630c1 100755 Binary files a/home-server/systemd/recurring-tasks/homeassistant-backup/homeassistant-backup and b/home-server/systemd/recurring-tasks/homeassistant-backup/homeassistant-backup differ diff --git a/home-server/systemd/recurring-tasks/homeassistant-backup/index.ts b/home-server/systemd/recurring-tasks/homeassistant-backup/index.ts index 9530215..2c0d478 100644 --- a/home-server/systemd/recurring-tasks/homeassistant-backup/index.ts +++ b/home-server/systemd/recurring-tasks/homeassistant-backup/index.ts @@ -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