|
|
@ -90,21 +90,16 @@ create_occ_if_not_exists() { |
|
|
|
## bare-minimum nextcloud run AND we will use occ to set some info |
|
|
|
## in this very same relation. |
|
|
|
|
|
|
|
## Note also that ``init`` is required as it sets |
|
|
|
## NEXTCLOUD_ADMIN_{USER,PASSWORD} that is required to trigger |
|
|
|
## a full installation |
|
|
|
## Note also that we need to set NEXTCLOUD_ADMIN_{USER,PASSWORD} |
|
|
|
## that is required to trigger a full installation |
|
|
|
|
|
|
|
if ! out=$( |
|
|
|
export COMPOSE_IGNORE_ORPHANS=true |
|
|
|
## XXXvlab: this is to avoid re-running init from |
|
|
|
## apache (if provided in compose.yml) that is bugged |
|
|
|
## and will delete all config. It'll be run even if it |
|
|
|
## seems excluded because ALL_RELATION is already |
|
|
|
## solved. These are 2 mishaps that will need to be |
|
|
|
## addressed in compose-core. |
|
|
|
export ALL_RELATIONS= |
|
|
|
compose --debug --without-relation="$SERVICE_NAME":web-proxy run \ |
|
|
|
read-0 LOGIN PASSWORD < "$PASSWORD_FILE" || exit 1 |
|
|
|
compose --debug --no-init --without-relation="$SERVICE_NAME":web-proxy run \ |
|
|
|
-v "$CHARM_PATH"/src/fake-apache:/usr/bin/apache \ |
|
|
|
-e NEXTCLOUD_ADMIN_USER=$LOGIN \ |
|
|
|
-e NEXTCLOUD_ADMIN_PASSWORD=$PASSWORD \ |
|
|
|
--rm --entrypoint /entrypoint.sh "$SERVICE_NAME" apache 2>&1 |
|
|
|
); then |
|
|
|
err "Initialization of code or database failed unexpectedly" |
|
|
|