update(nextcloud): v32
This commit is contained in:
1 parent
c62a1b8b29
commit
5938795cc3
3 files changed
+2
-91
No files matched your search
@@ -1,5 +0,0 @@
|
|||||||
FROM nextcloud:31-fpm-alpine
|
|
||||||
|
|
||||||
COPY healthcheck.sh /healthcheck.sh
|
|
||||||
|
|
||||||
RUN chmod u+x /healthcheck.sh
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------------------------------
|
|
||||||
#~ Name : Script name
|
|
||||||
#~ Description : Skel script
|
|
||||||
#~ Author : Etienne Girault <etienne.girault@gmail.com>
|
|
||||||
#~
|
|
||||||
#~ Usage : [-h] [-D] [-V]
|
|
||||||
#~
|
|
||||||
#~ Options : -h, --help ; Print help
|
|
||||||
#~ Options : -V, --version ; Print version
|
|
||||||
#~ Options : -D, --debug ; Debug
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------------------------------
|
|
||||||
# Variables
|
|
||||||
#----------------------------------------------------------------------------------------------------
|
|
||||||
script_name="$(grep '^#~ Name' "$0" | sed 's/^.*: //')"
|
|
||||||
script_version="$(grep '^#~ v' "$0" | tail -1 | sed -e 's/^#~ //' -e 's/ *\-.*$//')"
|
|
||||||
|
|
||||||
FOLDERS="Documents Ebook photo video download"
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------------------------------
|
|
||||||
# Functions
|
|
||||||
#----------------------------------------------------------------------------------------------------
|
|
||||||
print_script_name_version() { echo "$script_name $script_version" && sed -n '/^#~ Version/,$p' "$0" | grep '^#~' | sed 's/^#~ //'; }
|
|
||||||
print_script_description() { grep '^#~ Description' "$0" | sed 's/^.*: //'; }
|
|
||||||
print_script_usage() { grep '^#~ Usage' "$0" | sed -e 's/^.*: //' -e '1 s/^/Usage: '"${0##*/}"' /' -e '2,$ s/^/'"$(printf '%*s' "$(echo "Usage: ${0##*/}" | wc -c)")"'/'; }
|
|
||||||
print_script_options() { echo "Options" && grep '^#~ Options' "$0" | sed -e 's/^.*://' -e 's/^ --/ --/' | column -ts \;; }
|
|
||||||
print_script_help() { echo "$script_name $script_version" && print_script_description && print_script_usage && print_script_options; }
|
|
||||||
|
|
||||||
folder_is_empty() {
|
|
||||||
if [ -n "$(ls $1)" ]; then
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# Signals
|
|
||||||
trap 'exit 1' INT TERM
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------------------------------
|
|
||||||
# Options
|
|
||||||
#----------------------------------------------------------------------------------------------------
|
|
||||||
while getopts ":-:hVD" OPTION; do
|
|
||||||
case $OPTION in
|
|
||||||
h) print_script_help; exit;;
|
|
||||||
V) print_script_name_version; exit;;
|
|
||||||
D) set -x;;
|
|
||||||
:) ;;
|
|
||||||
-) case $OPTARG in
|
|
||||||
help) print_script_help; exit;;
|
|
||||||
version) print_script_name_version; exit;;
|
|
||||||
debug) set -x;;
|
|
||||||
esac ;;
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
shift $((OPTIND-1))
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------------------------------
|
|
||||||
# Start
|
|
||||||
#----------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
for folder in $FOLDERS; do
|
|
||||||
if folder_is_empty /mnt/data/$folder; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------------------------------
|
|
||||||
# End
|
|
||||||
#----------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#~ Version changelog
|
|
||||||
#~ v0.1 - Script creation
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
core:
|
core:
|
||||||
build: ./core
|
image: nextcloud:32-fpm-alpine
|
||||||
container_name: nextcloud_core
|
container_name: nextcloud_core
|
||||||
volumes:
|
volumes:
|
||||||
- /appli/data/nextcloud/data:/var/www/html
|
- /appli/data/nextcloud/data:/var/www/html
|
||||||
@@ -43,12 +43,6 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
healthcheck:
|
|
||||||
test: 'sh -c "/healthcheck.sh"'
|
|
||||||
interval: 1m
|
|
||||||
timeout: 5s
|
|
||||||
retries: 1
|
|
||||||
start_period: 20s
|
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
web:
|
web:
|
||||||
@@ -72,7 +66,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
cron:
|
cron:
|
||||||
image: nextcloud:31-fpm-alpine
|
image: nextcloud:32-fpm-alpine
|
||||||
container_name: nextcloud_cron
|
container_name: nextcloud_cron
|
||||||
volumes:
|
volumes:
|
||||||
- /appli/data/nextcloud/data:/var/www/html
|
- /appli/data/nextcloud/data:/var/www/html
|
||||||
|
|||||||
Reference in new issue
Block a user