some updates
This commit is contained in:
8
.gitmodules
vendored
Normal file
8
.gitmodules
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[submodule "backup"]
|
||||||
|
path = backup
|
||||||
|
url = ssh://gitea/john/file-backups.git
|
||||||
|
branch = new
|
||||||
|
[submodule "docker-observation"]
|
||||||
|
path = docker-observation
|
||||||
|
url = https://gitea.john-stream.com/john/docker-observation.git
|
||||||
|
branch = main
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
version: "3"
|
include:
|
||||||
|
- ./docker-observation/docker-compose.yml
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mqtt:
|
mqtt:
|
||||||
container_name: mosquitto
|
container_name: mosquitto
|
||||||
|
|||||||
1
docker-observation
Submodule
1
docker-observation
Submodule
Submodule docker-observation added at da4a933be7
17
scripts/backup.sh
Executable file
17
scripts/backup.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SCRIPT_DIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}"))
|
||||||
|
DATA_DIR=$SCRIPT_DIR/data
|
||||||
|
|
||||||
|
ENV_FILE=$SCRIPT_DIR/.env
|
||||||
|
source $ENV_FILE
|
||||||
|
|
||||||
|
docker run -it --rm \
|
||||||
|
--hostname $HOSTNAME \
|
||||||
|
--env-file $ENV_FILE \
|
||||||
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
|
-v /etc/timezone:/etc/timezone:ro \
|
||||||
|
-v $DATA_DIR:/data \
|
||||||
|
-v $RESTIC_REPO:/repo \
|
||||||
|
-e RESTIC_REPOSITORY=/repo \
|
||||||
|
restic/restic:latest "$@"
|
||||||
@@ -6,7 +6,7 @@ REPO_DIR=$(dirname $SCRIPT_DIR)
|
|||||||
COMPOSE_FILE=$REPO_DIR/docker-compose.yml
|
COMPOSE_FILE=$REPO_DIR/docker-compose.yml
|
||||||
ENV_FILE=$REPO_DIR/.env
|
ENV_FILE=$REPO_DIR/.env
|
||||||
|
|
||||||
echo "Please the mosquitto password:"
|
echo "Please input the mosquitto password:"
|
||||||
read -s MOSQUITTO_PASSWORD
|
read -s MOSQUITTO_PASSWORD
|
||||||
|
|
||||||
docker compose -f $COMPOSE_FILE run -it --rm mqtt mosquitto_passwd -b -c /mosquitto/config/pwfile homeassistant $MOSQUITTO_PASSWORD
|
docker compose -f $COMPOSE_FILE run -it --rm mqtt mosquitto_passwd -b -c /mosquitto/config/pwfile homeassistant $MOSQUITTO_PASSWORD
|
||||||
|
|||||||
Reference in New Issue
Block a user