Added mosquitto
This commit is contained in:
@@ -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'
|
||||
|
||||
8
home-server/mosquitto/config/mosquitto.conf
Normal file
8
home-server/mosquitto/config/mosquitto.conf
Normal 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/
|
||||
1
home-server/mosquitto/config/pwfile
Normal file
1
home-server/mosquitto/config/pwfile
Normal file
@@ -0,0 +1 @@
|
||||
admin:$7$101$kEph6X+U4i2qdSC5$Osz6gdmEmkLtO4ek0eGRBWzJpuaA6CcLImyPaGs13TWkKopFNUWCtHUDzyZ1U55yhFzIADhe0ppncJCFMlg5lQ==
|
||||
Binary file not shown.
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user