Browse Source

chg: [nextcloud] enhance catching installation errors

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
pull/29/head
Valentin Lab 2 years ago
parent
commit
875cbc2b38
  1. 13
      nextcloud/lib/common
  2. 3
      nextcloud/src/fake-apache

13
nextcloud/lib/common

@ -93,9 +93,16 @@ create_occ_if_not_exists() {
## NEXTCLOUD_ADMIN_{USER,PASSWORD} that is required to trigger
## a full installation
export COMPOSE_IGNORE_ORPHANS=true
compose --debug --without-relation="$SERVICE_NAME":web-proxy run \
--rm --entrypoint /entrypoint.sh "$SERVICE_NAME" apache >&2 || true
if ! out=$(
export COMPOSE_IGNORE_ORPHANS=true
compose --debug --without-relation="$SERVICE_NAME":web-proxy run \
-v "$CHARM_PATH"/src/fake-apache:/usr/bin/apache \
--rm --entrypoint /entrypoint.sh "$SERVICE_NAME" apache 2>&1
); then
err "Initialization of code or database failed unexpectedly"
e "$out" | prefix " | "
return 1
fi
if ! [ -e "$SERVICE_DATASTORE/var/www/html/occ" ]; then
err "Expected last command to create /var/www/html/occ"
return 1

3
nextcloud/src/fake-apache

@ -0,0 +1,3 @@
#!/bin/bash
true
Loading…
Cancel
Save