Fix CI, use postgres drop cascade
Some checks failed
CI / bump-infra (push) Blocked by required conditions
CI / build (push) Has been cancelled

This commit is contained in:
Philip Peterson 2026-06-11 22:25:31 -07:00
parent a99e367a49
commit c875eae064
3 changed files with 8 additions and 34 deletions

View file

@ -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

View file

@ -20,6 +20,7 @@ server {
fastcgi_pass 127.0.0.1:9000; fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param HTTP_HOST $http_host;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTP_PROXY ""; fastcgi_param HTTP_PROXY "";

View file

@ -31,7 +31,10 @@ if [ "${DRUPAL_FAST:-}" = "1" ]; then
echo "[entrypoint] DRUPAL_FAST=1 — skipping database wipe and full site reinstall." echo "[entrypoint] DRUPAL_FAST=1 — skipping database wipe and full site reinstall."
else else
echo "[entrypoint] Full rebuild mode (default). Dropping database..." 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)..." echo "[entrypoint] Installing Drupal (standard profile)..."
$DRUSH site:install standard \ $DRUSH site:install standard \
@ -41,6 +44,9 @@ else
-y || { echo "[entrypoint] FATAL: site:install failed."; exit 1; } -y || { echo "[entrypoint] FATAL: site:install failed."; exit 1; }
echo "[entrypoint] Drupal installed." 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 # Clear semaphores immediately after fresh install (prevents early
# duplicate key errors during first module enables + rebuild). # duplicate key errors during first module enables + rebuild).
$DRUSH sql:query "TRUNCATE TABLE semaphore;" 2>/dev/null || true $DRUSH sql:query "TRUNCATE TABLE semaphore;" 2>/dev/null || true