Skip to content

Commit

Permalink
remove nextcloud notify_push
Browse files Browse the repository at this point in the history
  • Loading branch information
SaswatPadhi committed Oct 21, 2024
1 parent 11295f3 commit 355940f
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 119 deletions.
22 changes: 3 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -590,23 +590,17 @@ for optionally customizing compositions via _overrides_.
<a href='https://hub.docker.com/r/padhihomelab/nextcloud/'>
<sub>cron</sub>
</a>
<br>
<a href='https://hub.docker.com/r/padhihomelab/nextcloud/'>
<sub>push</sub>
</a>
</th>
<td align='center'>
<code><sub>10.11.6</sub></code>
<br>
<code><sub>7.4.1</sub></code>
<br>
<code><sub>20240808...48</sub></code>
<br>
<code><sub>30.0.0...core</sub></code>
<code><sub>20241017...01</sub></code>
<br>
<code><sub>30.0.0...core</sub></code>
<code><sub>30.0.1-core</sub></code>
<br>
<code><sub>30.0.0...core</sub></code>
<code><sub>30.0.1-core</sub></code>
</td>
<td align='center'>
:heavy_check_mark:
Expand All @@ -621,8 +615,6 @@ for optionally customizing compositions via _overrides_.
:heavy_check_mark:
<br>
:heavy_check_mark:
<br>
:heavy_check_mark:
</td>
<td align='center'>
:heavy_multiplication_x:
Expand All @@ -634,8 +626,6 @@ for optionally customizing compositions via _overrides_.
:heavy_check_mark:
<br>
:heavy_check_mark:
<br>
:heavy_check_mark:
</td>
<td align='center'>
:heavy_multiplication_x:
Expand All @@ -647,8 +637,6 @@ for optionally customizing compositions via _overrides_.
:heavy_check_mark:
<br>
:heavy_check_mark:
<br>
:heavy_check_mark:
</td>
<td align='center'>
:heavy_check_mark:
Expand All @@ -663,8 +651,6 @@ for optionally customizing compositions via _overrides_.
:heavy_multiplication_x:
<br>
:heavy_multiplication_x:
<br>
:heavy_multiplication_x:
</td>
<td align='center'>
:heavy_multiplication_x:
Expand All @@ -676,8 +662,6 @@ for optionally customizing compositions via _overrides_.
:heavy_multiplication_x:
<br>
:heavy_multiplication_x:
<br>
:heavy_multiplication_x:
</td>
</tr>
<tr>
Expand Down
42 changes: 20 additions & 22 deletions _scripts/test_comp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SKIPPING_THIS=
# SETUP <test description> <comp arguments> [stdin content]
function SETUP () {
[ -z "$SKIPPING_THIS" ] || return
echo ; echo "${_fg_white_}${_bg_black_}${_bold_} T ${_normal_} Test $1: "
echo ; echo "${_fg_white_}${_bg_black_}${_bold_} T ${_normal_} Test that $1:"

local io_path_prefix="$( echo "$TEST_COMP_TMP_PATH/$1" \
| sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" \
Expand Down Expand Up @@ -107,14 +107,14 @@ function _EXIT () {
exit $FINAL_EXIT_CODE
}

SETUP "invocation without args" \
SETUP "invocation without args fails" \
""
CHECK $'grep -qs "<verb>\[,<verb>,\.\.\.\] \[flags\] <comp_dir> \[<comp_dir> \.\.\.\]" "$COMP_ERR_PATH"' \
CHECK $'grep -qs "<verb>\[,<verb>,\.\.\.\] \[flags\] \[options\] <comp_dir> \[<comp_dir> \.\.\.\]" "$COMP_ERR_PATH"' \
"Usage information on stderr"
CHECK $'[ $COMP_EXIT_CODE -eq $EXIT_CODE_USAGE_ERROR ]' \
"EXIT_CODE_USAGE_ERROR"

SETUP "status of non-existent composition" \
SETUP "operations on non-existent compositions fail" \
"status unknown_comp"
CHECK $'grep -qs "unknown_comp is not a base directory" "$COMP_ERR_PATH"' \
"Helpful message on stderr"
Expand All @@ -123,15 +123,15 @@ CHECK $'[ $COMP_EXIT_CODE -eq $EXIT_CODE_COMPOSITION_NOT_FOUND ]'\

_INIT tang

SETUP "stopping $TARGET_COMP_1_DISPLAY while its not running" \
SETUP "stopping $TARGET_COMP_1_DISPLAY while its not running passes" \
"down $TARGET_COMP_1"
CHECK $'grep -qs "Executing down on $TARGET_COMP_1" "$COMP_OUT_PATH"' \
"Info at beginning of execution"
CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
"EXIT_CODE = 0" \
exit_on_failure

SETUP "that status reports $TARGET_COMP_1_DISPLAY is unhealthy" \
SETUP "status reports $TARGET_COMP_1_DISPLAY is unhealthy" \
"status -P $TARGET_COMP_1"
CHECK $'grep -qs "Executing status on $TARGET_COMP_1" "$COMP_OUT_PATH"' \
"Info at beginning of execution"
Expand All @@ -143,7 +143,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq $EXIT_CODE_SIMPLE_VERB_FAILURE ]' \

echo "DEVICES=nyet" > $TARGET_COMP_1/options.override.conf

SETUP "overriddes list for $TARGET_COMP_1_DISPLAY with a bad option" \
SETUP "bad options in overriddes list break $TARGET_COMP_1_DISPLAY" \
"overrides -P $TARGET_COMP_1"
CHECK $'grep -qs "Invalid value \'nyet\' for \'DEVICES\' in $TARGET_COMP_1/options\.override\.conf" "$COMP_ERR_PATH"' \
"Configuration error reported for $TARGET_COMP_1_DISPLAY" \
Expand All @@ -154,7 +154,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq $EXIT_CODE_OPTIONS_CONF_ERROR ]' \

echo "DEVICES=no" > $TARGET_COMP_1/options.override.conf

SETUP "overriddes list for $TARGET_COMP_1_DISPLAY" \
SETUP "querying the overriddes list for $TARGET_COMP_1_DISPLAY otherwise passes" \
"overrides -P $TARGET_COMP_1"
CHECK $'grep -qs "Executing overrides on $TARGET_COMP_1" "$COMP_OUT_PATH"' \
"Info at beginning of execution"
Expand All @@ -164,15 +164,15 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
"EXIT_CODE = 0" \
exit_on_failure

SETUP "starting $TARGET_COMP_1_DISPLAY without prerequisites" \
SETUP "$TARGET_COMP_1_DISPLAY can be started without prerequisites" \
"up -P $TARGET_COMP_1"
CHECK $'grep -qs "Executing up on $TARGET_COMP_1" "$COMP_OUT_PATH"' \
"Info at beginning of execution"
CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
"EXIT_CODE = 0" \
exit_on_failure

SETUP "cleaning $TARGET_COMP_1_DISPLAY before stopping" \
SETUP "cleaning $TARGET_COMP_1_DISPLAY before stopping fails" \
"clean $TARGET_COMP_1"
CHECK $'grep -qs "Executing clean on $TARGET_COMP_1" "$COMP_OUT_PATH"' \
"Info at beginning of execution"
Expand All @@ -195,15 +195,15 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
"EXIT_CODE = 0" \
exit_on_failure

SETUP "stopping $TARGET_COMP_1_DISPLAY while its running" \
SETUP "stopping $TARGET_COMP_1_DISPLAY while its running passes" \
"down $TARGET_COMP_1"
CHECK $'grep -qs "Executing down on $TARGET_COMP_1" "$COMP_OUT_PATH"' \
"Info at beginning of execution"
CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
"EXIT_CODE = 0" \
exit_on_failure

SETUP "cleaning, but deny deleting data" \
SETUP "cleaning works when denying deletion of data" \
"clean $TARGET_COMP_1" \
"n"
CHECK $'grep -qs "Executing clean on $TARGET_COMP_1" "$COMP_OUT_PATH"' \
Expand All @@ -217,7 +217,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
"EXIT_CODE = 0" \
exit_on_failure

SETUP "cleaning, and allow deleting data" \
SETUP "cleaning works when allowing deletion of data" \
"clean $TARGET_COMP_1" \
"y"
CHECK $'grep -qs "Executing clean on $TARGET_COMP_1" "$COMP_OUT_PATH"' \
Expand All @@ -233,7 +233,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \

_INIT tiny_httpd

SETUP "starting $TARGET_COMP_1_DISPLAY & $TARGET_COMP_2_DISPLAY with different options" \
SETUP "$TARGET_COMP_1_DISPLAY & $TARGET_COMP_2_DISPLAY may be started with different options" \
"up -P $TARGET_COMP_1 $TARGET_COMP_2"
CHECK $'grep -lPqsz "Executing up on $TARGET_COMP_1.*\\n.*Disabled options: DEVICES \(conf\)" "$COMP_OUT_PATH"' \
"Info with disabled options at beginning of $TARGET_COMP_1_DISPLAY execution" \
Expand All @@ -247,7 +247,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \

echo "DEVICES=nyet" > $TARGET_COMP_1/options.override.conf

SETUP "stopping $TARGET_COMP_1_DISPLAY with a bad option & $TARGET_COMP_2_DISPLAY without options" \
SETUP "a bad option breaks $TARGET_COMP_1_DISPLAY but $TARGET_COMP_2_DISPLAY still works without options" \
"down -P $TARGET_COMP_1 $TARGET_COMP_2"
CHECK $'grep -qs "Invalid value \'nyet\' for \'DEVICES\' in $TARGET_COMP_1/options\.override\.conf" "$COMP_ERR_PATH"' \
"Configuration error reported for $TARGET_COMP_1_DISPLAY" \
Expand All @@ -262,10 +262,8 @@ CHECK $'[ $COMP_EXIT_CODE -eq $EXIT_CODE_OPTIONS_CONF_ERROR ]' \
"EXIT_CODE_OPTIONS_CONF_ERROR" \
exit_on_failure

rm $TARGET_COMP_1/options.override.conf

SETUP "stopping $TARGET_COMP_1_DISPLAY & $TARGET_COMP_2_DISPLAY without options" \
"down -P $TARGET_COMP_1 $TARGET_COMP_2"
SETUP "$TARGET_COMP_1_DISPLAY & $TARGET_COMP_2_DISPLAY can both be stopped when ignoring overrides" \
"down -P -O $TARGET_COMP_1 $TARGET_COMP_2"
CHECK $'grep -Pqs "Container $TARGET_COMP_1.* Removed" "$COMP_ERR_PATH"' \
"Stopped $TARGET_COMP_1_DISPLAY successfully" \
exit_on_failure
Expand All @@ -278,7 +276,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \

_INIT tang _.test.very_ .bad.name_

SETUP "starting $TARGET_COMP_3_DISPLAY" \
SETUP "starting $TARGET_COMP_3_DISPLAY works" \
"up -P $TARGET_COMP_3"
CHECK $'grep -qs "drops all \'\.\' from project name" "$COMP_ERR_PATH"' \
"Name validation error due to '.'"
Expand All @@ -290,7 +288,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \

_WAIT 30s "$TARGET_COMP_3_DISPLAY to start up and emit health status"

SETUP "that status reports $TARGET_COMP_3_DISPLAY is healthy" \
SETUP "status reports $TARGET_COMP_3_DISPLAY is healthy" \
"status -P $TARGET_COMP_3"
CHECK $'grep -qs "drops all \'\.\' from project name" "$COMP_ERR_PATH"' \
"Name validation error due to '.'"
Expand All @@ -302,7 +300,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \
"EXIT_CODE = 0; best-effort guess works for now" \
exit_on_failure

SETUP "stopping & cleaning $TARGET_COMP_3_DISPLAY" \
SETUP "stopping & cleaning $TARGET_COMP_3_DISPLAY work" \
"down,clean $TARGET_COMP_3"
CHECK $'grep -qs "drops all \'\.\' from project name" "$COMP_ERR_PATH"' \
"Name validation error due to '.'"
Expand Down
2 changes: 1 addition & 1 deletion comp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ usage () {
compositions="$(\ls -Cdw100000 */docker-compose.yml | sed 's:\/[^[:space:]]*::g; s:[[:space:]]\+: :g' | fmt -56 | column -t)"
echo -e "
Usage:
$0 <verb>[,<verb>,...] [flags] <comp_dir> [<comp_dir> ...]
$0 <verb>[,<verb>,...] [flags] [options] <comp_dir> [<comp_dir> ...]
Verbs: (short forms within <>)
<c>lean Delete '<comp_dir>/data'
Expand Down
16 changes: 2 additions & 14 deletions nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,15 @@
<a href='https://hub.docker.com/_/nextcloud'>
<sub>cron</sub>
</a>
<br>
<a href='https://hub.docker.com/_/nextcloud'>
<sub>push</sub>
</a>
</th>
<td align='center'>
<code><sub>10.9.3</sub></code>
<br>
<code><sub>7.0.5</sub></code>
<br>
<code><sub>28.0.3</sub></code>
<code><sub>30.0.1-core</sub></code>
<br>
<code><sub>28.0.3</sub></code>
<br>
<code><sub>28.0.3</sub></code>
<code><sub>30.0.1-core</sub></code>
</td>
<td align='center'>
:heavy_check_mark:
Expand All @@ -66,8 +60,6 @@
:heavy_check_mark:
<br>
:heavy_check_mark:
<br>
:heavy_check_mark:
</td>
<td align='center'>
:heavy_multiplication_x:
Expand All @@ -77,8 +69,6 @@
:heavy_check_mark:
<br>
:heavy_check_mark:
<br>
:heavy_check_mark:
</td>
<td align='center'>
:heavy_multiplication_x:
Expand All @@ -88,8 +78,6 @@
:heavy_check_mark:
<br>
:heavy_check_mark:
<br>
:heavy_check_mark:
</td>
<td align='center'>
:heavy_check_mark:
Expand Down
11 changes: 0 additions & 11 deletions nextcloud/config/nextcloud/push.sh

This file was deleted.

7 changes: 7 additions & 0 deletions nextcloud/docker-compose.pre_hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ mkdir -p "$DATA_DIR/mariadb/var/lib/mysql" \
"$DATA_DIR/nextcloud/data" \
"$DATA_DIR/nextcloud/var/www/html" \
"$DATA_DIR/nextcloud/usr/local/etc/php/conf.d"

# FIXME: Workaround from https://github.com/nextcloud/docker/issues/763#issuecomment-1007447212
touch "$DATA_DIR/nextcloud/usr/local/etc/php/conf.d/redis-session.ini"

# FIXME: Workaround from https://github.com/nextcloud/docker/issues/1494#issuecomment-1213540687
mkdir -p "$DATA_DIR/nextcloud/etc/apache2/conf-enabled"
touch "$DATA_DIR/nextcloud/etc/apache2/conf-enabled/remoteip.conf"
13 changes: 0 additions & 13 deletions nextcloud/docker-compose.up.pre_hook.sh

This file was deleted.

Loading

0 comments on commit 355940f

Please sign in to comment.