Make config:import run unconditionally on every boot
All checks were successful
Build and push image / build (push) Successful in 20m32s

config:import was gated behind IS_SETUP, so new config files added to
the sync directory were never applied on already-configured instances.
Move it outside the if/else so it always runs. Only module enables and
theme setup remain behind the first-time guard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Philip Peterson 2026-05-25 12:38:44 -07:00
parent 4232cded55
commit 4cc847eaa4

View file

@ -33,7 +33,7 @@ if [ "$HAS_TABLES" != "1" ]; then
fi fi
if [ "$IS_SETUP" != "1" ]; then if [ "$IS_SETUP" != "1" ]; then
echo "[entrypoint] Running setup (first boot or recovery from failed setup)..." echo "[entrypoint] Running first-time setup..."
$DRUSH en -y views views_ui field_ui text options link datetime && \ $DRUSH en -y views views_ui field_ui text options link datetime && \
echo "[entrypoint] Core modules enabled." || echo "[entrypoint] WARNING: core modules failed." echo "[entrypoint] Core modules enabled." || echo "[entrypoint] WARNING: core modules failed."
@ -44,25 +44,18 @@ if [ "$IS_SETUP" != "1" ]; then
$DRUSH en -y riverside_pt && \ $DRUSH en -y riverside_pt && \
echo "[entrypoint] riverside_pt enabled." || echo "[entrypoint] WARNING: riverside_pt failed." echo "[entrypoint] riverside_pt enabled." || echo "[entrypoint] WARNING: riverside_pt failed."
$DRUSH config:set system.site page.front /home -y && \
echo "[entrypoint] Front page set." || echo "[entrypoint] WARNING: front page config failed."
$DRUSH theme:enable starterkit_theme claro_compact -y && \ $DRUSH theme:enable starterkit_theme claro_compact -y && \
$DRUSH config:set system.theme default starterkit_theme -y && \ $DRUSH config:set system.theme default starterkit_theme -y && \
$DRUSH config:set system.theme admin claro_compact -y && \ $DRUSH config:set system.theme admin claro_compact -y && \
echo "[entrypoint] Themes set." || echo "[entrypoint] WARNING: theme enable failed." echo "[entrypoint] Themes set." || echo "[entrypoint] WARNING: theme enable failed."
if ls /var/www/html/config/sync/*.yml >/dev/null 2>&1; then echo "[entrypoint] First-time setup complete."
echo "[entrypoint] Importing configuration from sync dir..." fi
$DRUSH config:import --partial -y || echo "[entrypoint] WARNING: config import failed."
fi
echo "[entrypoint] Setup complete." if ls /var/www/html/config/sync/*.yml >/dev/null 2>&1; then
else echo "[entrypoint] Importing configuration..."
echo "[entrypoint] Setup already complete, importing configuration..." $DRUSH config:import -y && \
$DRUSH config:import -y >/dev/null 2>&1 && \ echo "[entrypoint] Config imported." || echo "[entrypoint] WARNING: config import failed."
echo "[entrypoint] Config imported." || \
echo "[entrypoint] No config to import, continuing."
fi fi
npm run build --prefix /var/www/html >/dev/null 2>&1 && echo "[entrypoint] Tailwind built." || echo "[entrypoint] WARNING: Tailwind build failed." npm run build --prefix /var/www/html >/dev/null 2>&1 && echo "[entrypoint] Tailwind built." || echo "[entrypoint] WARNING: Tailwind build failed."