diff --git a/bootc/scenario1/root/etc/containers/systemd/nextcloud-fpm.container b/bootc/scenario1/root/etc/containers/systemd/nextcloud-app.container similarity index 86% rename from bootc/scenario1/root/etc/containers/systemd/nextcloud-fpm.container rename to bootc/scenario1/root/etc/containers/systemd/nextcloud-app.container index 0be28ba..3592ead 100644 --- a/bootc/scenario1/root/etc/containers/systemd/nextcloud-fpm.container +++ b/bootc/scenario1/root/etc/containers/systemd/nextcloud-app.container @@ -26,7 +26,7 @@ EnvironmentFile=/etc/containers/systemd/configs/nextcloud-app.env EnvironmentFile=/etc/containers/systemd/configs/nextcloud-config.env # Volume mounts -Volume=/var/lib/nextcloud:/var/www/html:z +Volume=/var/lib/nextcloud/data:/var/www/html:z Volume=/var/lib/nextcloud/config/www.conf:/usr/local/etc/php-fpm.d/www.conf:Z Volume=/var/lib/nextcloud/config/redis-session.ini:/usr/local/etc/php/conf.d/redis-session.ini:Z @@ -45,8 +45,8 @@ TimeoutStopSec=30 # Skaffold filesystem + fix permissions ExecStartPre=/bin/bash -Eeuo pipefail -c 'install -m 0700 -o 82 -g 82 -d /var/lib/nextcloud/data /var/lib/nextcloud/config ; \ - install -m 0700 -o 82 -g 82 -d /etc/containers/systemd/configs/www.conf /var/lib/nextcloud/config/www.conf ; \ - install -m 0700 -o 82 -g 82 -d /etc/containers/systemd/configs/redis-session.ini /var/lib/nextcloud/config/redis-session.ini' + install -m 0700 -o 82 -g 82 /etc/containers/systemd/configs/www.conf /var/lib/nextcloud/config/www.conf ; \ + install -m 0700 -o 82 -g 82 /etc/containers/systemd/configs/redis-session.ini /var/lib/nextcloud/config/redis-session.ini' # Wait for PostgreSQL to be ready ExecStartPre=/bin/sh -c 'exec 2>/dev/null; for try in $(seq 0 12); do if ! /bin/true 5<> /dev/tcp/127.0.0.1/5432; then echo "Waiting for PostgreSQL to be available..."; sleep 5; else exit 0; fi; done; exit 1' diff --git a/bootc/scenario1/root/etc/greenboot/check/required.d/30_nextcloud_check.sh b/bootc/scenario1/root/etc/greenboot/check/required.d/30_nextcloud_check.sh index 4e1978b..8d89362 100755 --- a/bootc/scenario1/root/etc/greenboot/check/required.d/30_nextcloud_check.sh +++ b/bootc/scenario1/root/etc/greenboot/check/required.d/30_nextcloud_check.sh @@ -4,11 +4,11 @@ set -Eeuo pipefail declare -a container_state=() MAX_ATTEMPTS=60 -for attempt in (( i=1; i<=MAX_ATTEMPTS; i++ )); do +for (( attempt=1; attempt<=MAX_ATTEMPTS; attempt++ )); do echo "Checking Nextcloud deployment ($attempt/$MAX_ATTEMPTS)..." state=1 - for container in nextcloud-db nextcloud-redis nextcloud-fpm nextcloud-nginx; do + for container in nextcloud-db nextcloud-redis nextcloud-app nextcloud-nginx; do container_state=( $( ( podman inspect "$container" || true ) | jq -r '.[0].State.Status // "unknown", .[0].State.Health.Status // "unknown"') ) echo "Container $container has state ${container_state[0]} and its health is ${container_state[1]}!" if [[ "${container_state[0]}-${container_state[1]}" != "running-healthy" ]]; then diff --git a/bootc/scenario1/root/etc/systemd/system/nextcloud.target b/bootc/scenario1/root/etc/systemd/system/nextcloud.target index 3a2ba68..c045880 100644 --- a/bootc/scenario1/root/etc/systemd/system/nextcloud.target +++ b/bootc/scenario1/root/etc/systemd/system/nextcloud.target @@ -1,8 +1,8 @@ [Unit] Description=Nextcloud Service Target Documentation=man:systemd.target(5) -Wants=nextcloud-db.service nextcloud-redis.service nextcloud-fpm.service nextcloud-nginx.service -After=nextcloud-db.service nextcloud-redis.service nextcloud-fpm.service nextcloud-nginx.service +Wants=nextcloud-db.service nextcloud-redis.service nextcloud-app.service nextcloud-nginx.service +After=nextcloud-db.service nextcloud-redis.service nextcloud-app.service nextcloud-nginx.service # Allow isolation - can stop/start this target independently AllowIsolate=yes diff --git a/bootc/scenario4/root/etc/greenboot/check/required.d/30_odoo_check.sh b/bootc/scenario4/root/etc/greenboot/check/required.d/30_odoo_check.sh index ab3b5df..670fb4f 100755 --- a/bootc/scenario4/root/etc/greenboot/check/required.d/30_odoo_check.sh +++ b/bootc/scenario4/root/etc/greenboot/check/required.d/30_odoo_check.sh @@ -4,7 +4,7 @@ set -Eeuo pipefail declare -a container_state=() MAX_ATTEMPTS=60 -for attempt in (( i=1; i<=MAX_ATTEMPTS; i++ )); do +for (( attempt=1; attempt<=MAX_ATTEMPTS; attempt++ )); do echo "Checking Odoo deployment ($attempt/$MAX_ATTEMPTS)..." state=1