mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-11-23 15:58:04 +01:00
Compare commits
2 commits
d2417fc187
...
fe3cfeff25
Author | SHA1 | Date | |
---|---|---|---|
fe3cfeff25 | |||
ce7db9a8e6 |
16 changed files with 23 additions and 35 deletions
|
@ -4,11 +4,7 @@
|
||||||
SOURCE_DIRECTORY="/mnt/data/nextcloud-aio/backups/borg"
|
SOURCE_DIRECTORY="/mnt/data/nextcloud-aio/backups/borg"
|
||||||
RCLONE_CONFIG="borgbase-nextcloud-aio"
|
RCLONE_CONFIG="borgbase-nextcloud-aio"
|
||||||
|
|
||||||
TARGET_DIRECTORY="repo" # this is the BorgBase directory name: modify it only if you want to specify a different one (discouraged)
|
TARGET_DIRECTORY="repo"
|
||||||
|
|
||||||
########################################
|
|
||||||
# DO NOT modify any of the following! #
|
|
||||||
########################################
|
|
||||||
|
|
||||||
if [ "$EUID" -ne 0 ]; then
|
if [ "$EUID" -ne 0 ]; then
|
||||||
echo "run as root"
|
echo "run as root"
|
||||||
|
@ -39,19 +35,11 @@ touch "$SOURCE_DIRECTORY/aio-lockfile"
|
||||||
|
|
||||||
|
|
||||||
if ! rclone sync -v --exclude aio-lockfile "$SOURCE_DIRECTORY/" "$RCLONE_CONFIG:$TARGET_DIRECTORY"; then
|
if ! rclone sync -v --exclude aio-lockfile "$SOURCE_DIRECTORY/" "$RCLONE_CONFIG:$TARGET_DIRECTORY"; then
|
||||||
if docker ps --format "{{.Names}}" | grep "^nextcloud-aio-nextcloud$"; then
|
echo "Failed to synchronise the backup repository with the target directory."
|
||||||
docker exec -en nextcloud-aio-nextcloud bash /notify.sh "Rclone failed." "Failed to synchronise the backup repository with the target directory."
|
|
||||||
else
|
|
||||||
echo "Failed to synchronise the backup repository with the target directory."
|
|
||||||
fi
|
|
||||||
rm "$SOURCE_DIRECTORY/aio-lockfile"
|
rm "$SOURCE_DIRECTORY/aio-lockfile"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm "$SOURCE_DIRECTORY/aio-lockfile"
|
rm "$SOURCE_DIRECTORY/aio-lockfile"
|
||||||
|
|
||||||
if docker ps --format "{{.Names}}" | grep "^nextcloud-aio-nextcloud$"; then
|
echo "Done"
|
||||||
docker exec -en nextcloud-aio-nextcloud bash /notify.sh "Rclone backup successful!" "Synchronised the backup repository successfully."
|
|
||||||
else
|
|
||||||
echo "Synchronised the backup repository successfully."
|
|
||||||
fi
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ services:
|
||||||
- ./db:/app/db
|
- ./db:/app/db
|
||||||
- ./data:/app/data
|
- ./data:/app/data
|
||||||
ports:
|
ports:
|
||||||
- "8001:8000"
|
- "127.0.0.1:8001:8000"
|
||||||
user: 1000:1000
|
user: 1000:1000
|
||||||
restart: always
|
restart: always
|
||||||
init: true
|
init: true
|
||||||
|
|
|
@ -7,7 +7,7 @@ services:
|
||||||
- ./db:/app/db
|
- ./db:/app/db
|
||||||
- ./media:/app/media
|
- ./media:/app/media
|
||||||
ports:
|
ports:
|
||||||
- "8002:8000"
|
- "127.0.0.1:8002:8000"
|
||||||
restart: always
|
restart: always
|
||||||
init: true
|
init: true
|
||||||
tty: true
|
tty: true
|
||||||
|
|
|
@ -8,4 +8,4 @@ services:
|
||||||
mem_limit: 3g
|
mem_limit: 3g
|
||||||
cpus: 3
|
cpus: 3
|
||||||
ports:
|
ports:
|
||||||
- "9002:8443"
|
- "127.0.0.1:9002:8443"
|
||||||
|
|
|
@ -4,4 +4,4 @@ services:
|
||||||
context: sources
|
context: sources
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "9010:80"
|
- "127.0.0.1:9010:80"
|
||||||
|
|
|
@ -8,6 +8,6 @@ services:
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ports:
|
ports:
|
||||||
- "23730:22"
|
- "127.0.0.1:23730:22"
|
||||||
- "8006:3000"
|
- "127.0.0.1:8006:3000"
|
||||||
mem_limit: 512m
|
mem_limit: 512m
|
||||||
|
|
|
@ -4,7 +4,7 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
env_file: plex.env
|
env_file: plex.env
|
||||||
ports:
|
ports:
|
||||||
- "9003:32400"
|
- "127.0.0.1:9003:32400"
|
||||||
# - "32400:32400/tcp"
|
# - "32400:32400/tcp"
|
||||||
# - "3005:3005/tcp"
|
# - "3005:3005/tcp"
|
||||||
# - "8324:8324/tcp"
|
# - "8324:8324/tcp"
|
||||||
|
@ -27,7 +27,7 @@ services:
|
||||||
- ./data:/data
|
- ./data:/data
|
||||||
mem_limit: 2g
|
mem_limit: 2g
|
||||||
ports:
|
ports:
|
||||||
- "9004:9091"
|
- "127.0.0.1:9004:9091"
|
||||||
sonarr:
|
sonarr:
|
||||||
image: lscr.io/linuxserver/sonarr:latest
|
image: lscr.io/linuxserver/sonarr:latest
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -37,7 +37,7 @@ services:
|
||||||
- ./data:/data
|
- ./data:/data
|
||||||
mem_limit: 1g
|
mem_limit: 1g
|
||||||
ports:
|
ports:
|
||||||
- "9005:8989"
|
- "127.0.0.1:9005:8989"
|
||||||
prowlarr:
|
prowlarr:
|
||||||
image: lscr.io/linuxserver/prowlarr:latest
|
image: lscr.io/linuxserver/prowlarr:latest
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -46,7 +46,7 @@ services:
|
||||||
- ./prowlarr:/config
|
- ./prowlarr:/config
|
||||||
mem_limit: 1g
|
mem_limit: 1g
|
||||||
ports:
|
ports:
|
||||||
- "9006:9696"
|
- "127.0.0.1:9006:9696"
|
||||||
radarr:
|
radarr:
|
||||||
image: lscr.io/linuxserver/radarr:latest
|
image: lscr.io/linuxserver/radarr:latest
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -56,7 +56,7 @@ services:
|
||||||
- ./data:/data
|
- ./data:/data
|
||||||
mem_limit: 1g
|
mem_limit: 1g
|
||||||
ports:
|
ports:
|
||||||
- "9007:7878"
|
- "127.0.0.1:9007:7878"
|
||||||
unpackerr:
|
unpackerr:
|
||||||
image: golift/unpackerr
|
image: golift/unpackerr
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -9,7 +9,7 @@ services:
|
||||||
test: ["CMD", "/usr/bin/miniflux", "-healthcheck", "auto"]
|
test: ["CMD", "/usr/bin/miniflux", "-healthcheck", "auto"]
|
||||||
mem_limit: 512m
|
mem_limit: 512m
|
||||||
ports:
|
ports:
|
||||||
- "8008:3298"
|
- "127.0.0.1:8008:3298"
|
||||||
db:
|
db:
|
||||||
image: postgres:15
|
image: postgres:15
|
||||||
restart: always
|
restart: always
|
||||||
|
|
|
@ -26,7 +26,7 @@ services:
|
||||||
# security_opt: ["label:disable"] # Is needed when using SELinux
|
# security_opt: ["label:disable"] # Is needed when using SELinux
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "9011:8080"
|
- "127.0.0.1:9011:8080"
|
||||||
restart: always
|
restart: always
|
||||||
container_name: nextcloud-aio-mastercontainer
|
container_name: nextcloud-aio-mastercontainer
|
||||||
init: true
|
init: true
|
||||||
|
|
|
@ -6,4 +6,4 @@ services:
|
||||||
- ./portainer_data:/data
|
- ./portainer_data:/data
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
ports:
|
ports:
|
||||||
- "9001:9443"
|
- "127.0.0.1:9001:9443"
|
||||||
|
|
|
@ -9,4 +9,4 @@ services:
|
||||||
cpus: 0.5
|
cpus: 0.5
|
||||||
mem_limit: 150m
|
mem_limit: 150m
|
||||||
ports:
|
ports:
|
||||||
- "8010:8080"
|
- "127.0.0.1:8010:8080"
|
||||||
|
|
|
@ -7,4 +7,4 @@ services:
|
||||||
- ./shortener_data:/db
|
- ./shortener_data:/db
|
||||||
mem_limit: 300m
|
mem_limit: 300m
|
||||||
ports:
|
ports:
|
||||||
- "8011:8000"
|
- "127.0.0.1:8011:8000"
|
||||||
|
|
|
@ -5,6 +5,6 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/app
|
- ./:/app
|
||||||
ports:
|
ports:
|
||||||
- "9008:8080"
|
- "127.0.0.1:9008:8080"
|
||||||
init: true
|
init: true
|
||||||
tty: true
|
tty: true
|
||||||
|
|
|
@ -7,4 +7,4 @@ services:
|
||||||
- ./wallabag_data/data:/var/www/wallabag/data
|
- ./wallabag_data/data:/var/www/wallabag/data
|
||||||
- ./wallabag_data/images:/var/www/wallabag/web/assets/images
|
- ./wallabag_data/images:/var/www/wallabag/web/assets/images
|
||||||
ports:
|
ports:
|
||||||
- "8009:80"
|
- "127.0.0.1:8009:80"
|
||||||
|
|
|
@ -11,4 +11,4 @@ services:
|
||||||
extra_params: '--o:ssl.enable=false --o:ssl.termination=true'
|
extra_params: '--o:ssl.enable=false --o:ssl.termination=true'
|
||||||
mem_limit: 2g
|
mem_limit: 2g
|
||||||
ports:
|
ports:
|
||||||
- "8007:9980"
|
- "127.0.0.1:8007:9980"
|
||||||
|
|
|
@ -12,7 +12,7 @@ services:
|
||||||
tty: true
|
tty: true
|
||||||
mem_limit: 512m
|
mem_limit: 512m
|
||||||
ports:
|
ports:
|
||||||
- "8012:8000"
|
- "127.0.0.1:8012:8000"
|
||||||
db:
|
db:
|
||||||
image: postgres:15
|
image: postgres:15
|
||||||
restart: always
|
restart: always
|
||||||
|
|
Loading…
Reference in a new issue