feat(Dockerfile): add automatic Drupal deploy feature #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
The changes in this commit add an automatic Drupal deployment feature to the default Dockerfile for the Drupal-PHP template.
The main changes are:
DRUPAL_DEPLOY_CHANGESthat can be set toautoto enable automatic deployment./docker-entrypoint-init.d/50-deploy-changes.shthat checks the database version and performs a deployment if the codebase version is newer.Why
This feature allows the Drupal application to be automatically updated when the codebase changes, without the need for manual intervention.
Additional Context
Changes required on workflow: This change requires to also update the "build" workflow to ensure that the init script is included in the container as we already do for things like the crontab file, and the nginx error page. The only difference from the previous steps is that the job only needs to ensure that the file is pleced in
[repo-root]/infrastructure/docker/drupal-php/init.dand then the Dockerfile will take care of the rest.Example:
Used also on: a slight variation of this is in use in Sikt with their docker init files.