Skip to content

Commit c4489cd

Browse files
committed
- preloading cache files
Given issues like [PCD108](proudcity/pc-dev-issues#108 (comment)) where we see sites without CSS loaded I wonder if the database is thinking it has the cache files but we're on a new pod that just spun up and thus doesn't have the cache files in the location on the server. The server files are pod specific whereas the database is shared amongst pods behind REDIS. This preloads the cache files when we spin up a pod.
1 parent 48f6185 commit c4489cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bin/entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ export UPLOAD_MAX_FILESIZE=${UPLOAD_MAX_FILESIZE:-"25M"}
140140
echo "Importing WP Rocket configuration"
141141
wp rocket import --allow-root /app/bin/wp-rocket.json
142142

143+
# preload cache files
144+
wp rocket preload --allow-root
145+
143146
# enable redis requires the Redis Cache plugin to be active
144147
echo "Enabling Redis"
145148
wp redis enable --allow-root

0 commit comments

Comments
 (0)