Extend config options, including adding more per-site configuration

Created on 1 February 2024, 5 months ago

Problem/Motivation

The script currently assumes and expects every site to have drush aliases setup, particularly one for the production server, to allow for pulling the production database prior to running updates. This is great if all the sites you manage are hosted by you and are setup the same way using drush aliases. However, if you want to use this for updating sites hosted on other servers with codebases that may be managed by somebody else who may not offer any option to use drush to sync anything to or from production, this isn't much use.

Currently, there is no config option, globally or per-site, to specify whether or not a DB sync should be done first. Furthermore, each site must have a prod drush alias name match configured or it will fail config validation.

Syncing the database should be entirely optional and there should not be any requirement to have or use drush aliases to communicate with any remote servers. It would be ideal to have both global and per-site configurations so it's easy to configure it for various use cases.

Proposed resolution

  • Add an optional global boolean configuration option something like "sync_prod_database". If not defined, it will assume false by default.
  • Add an optional similar config option for each site, which would override the global default.
  • Make the prod_alias_name_match per-site config required ONLY if the sync_prod_database option is set to true (either globally or for the site). If the latter option is set to false, then prod_alias_name_match would be ignored even if set.

Remaining tasks

  • Update the sample config files with the new config options and documentation for them
  • Implement code changes to respect the new config options
  • TEST TEST TEST with varying configurations for a few different sites
✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada teknocat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024