Compare commits

...

2 commits

Author SHA1 Message Date
fe3cfeff25 open docker ports on localhost only
Some checks are pending
/ run ansible (push) Waiting to run
2024-10-15 19:00:21 +02:00
ce7db9a8e6 simplify borg sync script 2024-10-15 18:32:42 +02:00
16 changed files with 23 additions and 35 deletions

View file

@ -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
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." 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

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -4,4 +4,4 @@ services:
context: sources context: sources
restart: always restart: always
ports: ports:
- "9010:80" - "127.0.0.1:9010:80"

View file

@ -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

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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