frederikrogalski / compose-update Goto Github PK
View Code? Open in Web Editor NEWThis python script updates the images of one or many docker-compose stacks.
This python script updates the images of one or many docker-compose stacks.
First: Thank you for the great script.
A small suggestion for improvement for the update_compose() function:
Change to the respective directory before docker-compose. This would have the advantage if relative paths are used in the compose file that this would then work.
Or am I thinking wrong here (I'm not that experienced with docker yet...)
Thanks again & best regards Andreas Kuhl
def update_compose(compose_path):
compose_file = os.path.basename(compose_path)
compose_dir = os.path.dirname(compose_path)
return os.system(f'cd {compose_dir} && {compose_prefix} -f {compose_file} up -d')
In many update tricks, the data is lost. What is the case here.
Cannot seem to get this working on a Synology NAS.
I have installed all the dependencies as per the install section but the script still can't pick up any directory paths?
I'm not sure if I have the script in the right location. I have tried putting it inside a folder where I have a docker-compose.yml and putting it in the docker-compose.yml parent folder but both produce the same output as attached below. Any suggestions?
COMMAND:
/usr/bin/env python3 "/volume1/scripts/docker-compose-stacks/compose-update/compose-update.py" *
OUTPUT:
Task Scheduler has completed a scheduled task.
Task: Update docker-compose stacks
Start time: Sun, 14 Aug 2022 19:04:47 GMT
Stop time: Sun, 14 Aug 2022 19:04:49 GMT
Current status: 0 (Normal)
Standard output/error:
[92m
Checking directory paths and searching for compose files. [0m
[93mDirectory 'compose-update' doesn't contain a compose file [0m
Starting update process on '0' compose stacks
[92m
Pulling images [0m
[92m
Restarting composes [0m
Update process finished on 0/0 compose stacks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.