Utility to download a remote docker-compose.yml file for updating purposes
Name | Description | Default |
---|---|---|
download_path | The url to download the docker-compose.yml file from | https://raw.githubusercontent.com/example/docker-compose/main/docker-compose.yml |
compose_file_path | Path of the file to update | ./docker-compose.yml |
backup_file_path | Path of the backup | ./docker-compose.yml.bck |
update_regex | Regex to determine the version of respective docker-compose.yml files | image: [\w.\-/]*:([\w.\-/]*) |
show-diff | Whether to show the difference of local and remote | True |
env_file_path | Path of the environment file | = disabled(activated example: ./.env ) |
env_version_variable | Variable that stores the current version in your environment file. | version |
Adjust the call to docker-compose-puller.py
or update default values within.
This script will do the following:
- Download the docker-compose.yml file from
download_path
- Show current and new version
- Display your current version from
compose_file_path
searched using the regexupdate_regex
- Display your new version from
download_path
searched using the regexupdate_regex
- Display your current version from
- Ask for confirmation to update
- Show diffs if
show-diff
is set to True- Asks for confirmation
- Update files accordingly
- Move
compose_file_path
intobackup_file_path
- Save
download_path
tocompose_file_path
- Update the variable
update_regex
inenv_file_path
to new version
- Move