Provisioning now restores all GUI customizations on reset+reprovision: - create_pod_espocrm.sh: deploy the version-controlled espocrm-custom/ tree (CTag entity, layouts, i18n, clientDefs, custom views, custom CSS) into the pod, then chown www-data and rebuild. Replaces the earlier inline CSS-only step. Adds a live-phase cache rebuild so customizations and the client cacheTimestamp are refreshed on every run. - espocrm-custom/: snapshot of custom/ and client/custom/ (source of truth). - snapshot_espocrm_custom.sh: refresh the snapshot from a running pod. - readme.md: usage, first-time host setup, image-update and reset workflows. - Include the task/instruction notes and plan.md for reference. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
28 lines
1.1 KiB
Bash
Executable File
28 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# To be run by user mkt. Refreshes the version-controlled GUI-customization
|
|
# snapshot ($CUSTOM_SRC) from the running EspoCRM pod. Run this after making
|
|
# customizations in the EspoCRM GUI (Entity Manager, Layout Manager, Label
|
|
# Manager, etc.) so create_pod_espocrm.sh can restore them on reset+reprovision.
|
|
# Commit the result to the repo afterwards.
|
|
|
|
# Environment variables
|
|
WEB_CTR='espocrm_ctr'
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
CUSTOM_SRC="$SCRIPT_DIR/espocrm-custom" # contains custom/ and client/custom/
|
|
|
|
if ! podman exec "$WEB_CTR" true 2>/dev/null; then
|
|
echo "ERROR: container $WEB_CTR is not running. Start the pod first." >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Pull /var/www/html/{custom,client/custom} into a clean snapshot dir.
|
|
rm -rf "$CUSTOM_SRC"
|
|
mkdir -p "$CUSTOM_SRC"
|
|
podman exec "$WEB_CTR" tar -C /var/www/html -cf - custom client/custom \
|
|
| tar -C "$CUSTOM_SRC" -xf - --no-same-owner
|
|
echo "Refreshed snapshot at $CUSTOM_SRC (rc=$?)"
|
|
|
|
echo "Files: $(find "$CUSTOM_SRC" -type f | wc -l)"
|
|
echo "Review and commit, e.g.: git -C \"$SCRIPT_DIR\" add espocrm-custom && git -C \"$SCRIPT_DIR\" commit -m 'Update EspoCRM customizations snapshot'"
|