Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions templates/wordpress-composer/files/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,21 @@ hooks:
set -e
# Copy manually-provided plugins into the plugins directory.
# This allows manually-provided and composer-provided plugins to coexist.
rsync -a plugins/* wordpress/wp-content/plugins/
rsync -a plugins/ wordpress/wp-content/plugins/

# The deploy hook is run after the app container has been started, but before it has started accepting requests.
# More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
deploy: |
# Flushes the object cache which might have changed between current production and newly deployed changes
wp cache flush
# Runs the WordPress database update procedure in case core is being updated with the newly deployed changes
wp core update-db
# Runs all cron events that are due now and may have come due during the build+deploy procedure
wp cron event run --due-now
if [ $(wp core is-installed) ]; then
# Flushes the object cache which might have changed between current production and newly deployed changes
wp cache flush
# Runs the WordPress database update procedure in case core is being updated with the newly deployed changes
wp core update-db
# Runs all cron events that are due now and may have come due during the build+deploy procedure
wp cron event run --due-now
else
echo "WordPress is not installed. Skipping deploy steps."
fi

# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
Expand Down Expand Up @@ -107,6 +111,11 @@ mounts:
source: local
source_path: "uploads"

# More information: https://docs.platform.sh/create-apps/app-reference.html#extensions
runtime:
extensions:
- blackfire

########################################################################################################################
## ##
## This source operation is part of the Platform.sh process of updating and maintaining our collection of templates. ##
Expand Down