Code Monkey home page Code Monkey logo

compose-update's Introduction

Stats Top Languages

compose-update's People

Contributors

depfryer avatar frederikrogalski avatar x3griff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

compose-update's Issues

Unable to detect directory path

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

Suggestion: Optimize update_compose()

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')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.