As a test, I moved the after_assets_precompile commands to the custom command section.
run:
- exec: echo "Beginning of custom commands"
## If you want to set the 'From' email address for your first registration, uncomment and change:
## After getting the first signup email, re-comment the line. It only needs to run once.
#- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
## command to password protect the website during work. remove for production.
- exec:
cd: $home
cmd:
- echo "Beginning of precompile commands"
- sudo -E -u discourse bundle exec rake s3:upload_assets
- sudo -E -u discourse bundle exec rake s3:expire_missing_assets
- exec: echo "End of custom commands"
The commands worked without any issues. This rules out environmental access or security issues.
The launcher process is skipping the after_assets_precompile code during the rebuild.
Any one have a clue?