diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml deleted file mode 100644 index 13510cf..0000000 --- a/.gitea/workflows/build.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build and push image - -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to registry - uses: docker/login-action@v3 - with: - registry: forge.quinefoundation.com - username: ${{ secrets.REGISTRY_USERNAME }} - password: ${{ secrets.REGISTRY_PASSWORD }} - - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - platforms: linux/amd64,linux/arm64 - push: true - tags: forge.quinefoundation.com/ironmagma/riverside:latest diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf index b5cdcdc..ce0fdf5 100644 --- a/docker/nginx/default.conf +++ b/docker/nginx/default.conf @@ -20,6 +20,7 @@ server { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; + fastcgi_param HTTP_HOST $http_host; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTP_PROXY ""; diff --git a/docker/php/entrypoint.sh b/docker/php/entrypoint.sh index e63a6ed..cefa1f0 100644 --- a/docker/php/entrypoint.sh +++ b/docker/php/entrypoint.sh @@ -31,7 +31,10 @@ if [ "${DRUPAL_FAST:-}" = "1" ]; then echo "[entrypoint] DRUPAL_FAST=1 — skipping database wipe and full site reinstall." else echo "[entrypoint] Full rebuild mode (default). Dropping database..." - $DRUSH sql:drop -y || true + # DROP SCHEMA ... CASCADE is more reliable than drush sql:drop on PostgreSQL: + # it removes all tables atomically regardless of dependency order, so + # site:install always starts from a completely clean schema. + $DRUSH sql:query "DROP SCHEMA public CASCADE; CREATE SCHEMA public; GRANT ALL ON SCHEMA public TO ${DB_USER}; GRANT ALL ON SCHEMA public TO public;" || true echo "[entrypoint] Installing Drupal (standard profile)..." $DRUSH site:install standard \ @@ -41,6 +44,9 @@ else -y || { echo "[entrypoint] FATAL: site:install failed."; exit 1; } echo "[entrypoint] Drupal installed." + $DRUSH sql:query "SELECT 1 FROM flood LIMIT 1" >/dev/null 2>&1 \ + || { echo "[entrypoint] FATAL: flood table missing after site:install — schema incomplete."; exit 1; } + # Clear semaphores immediately after fresh install (prevents early # duplicate key errors during first module enables + rebuild). $DRUSH sql:query "TRUNCATE TABLE semaphore;" 2>/dev/null || true