Giter VIP home page Giter VIP logo

compose-updater's People

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  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-updater's Issues

The ONCE env is being ignored

Hello!

I tried Docker Compose and Docker CLI to create a Container with the ONCE variable, but its getting ignored.

My docker-compose.yaml:

version: '3'
services:
  watcher:
    image: virtualzone/compose-updater
      #restart: never
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "/home/docker/:/home/docker:ro"
    environment:
      - "ONCE=1"

My CLI command:

docker run -v "/var/run/docker.sock:/var/run/docker.sock:ro" -v "/home/docker/:/home/docker:ro" -e "ONCE=1" virtualzone/compose-updater

The Output of the CLI Command:

2023/06/12 09:53:51 Compose Updater 2.4.0
2023/06/12 09:53:51 Using settings:
2023/06/12 09:53:51     cleanup ......... false
2023/06/12 09:53:51     dry ............. false
2023/06/12 09:53:51     help ............ false
2023/06/12 09:53:51     interval ........ 60
2023/06/12 09:53:51     once ............ false
2023/06/12 09:53:51     printSettings ... true
2023/06/12 09:53:51     build ........... false
2023/06/12 09:53:51     mqttBroker ...... 
2023/06/12 09:53:51     mqttClientId .... composeupdater
2023/06/12 09:53:51     mqttTopicPrefix . composeupdater
2023/06/12 09:53:51     mqttUsername .... 
2023/06/12 09:53:51     mqttPassword .... (hidden)

Any ideas why its not working?

Pulling for service X Failed

When I run compose-updater, I get this error. What is wrong with my configuration?

LOG:

2022/01/13 20:16:07 Compose Updater 1.1.4
2022/01/13 20:16:07 Using settings:
2022/01/13 20:16:07     cleanup ......... true
2022/01/13 20:16:07     dry ............. false
2022/01/13 20:16:07     help ............ false
2022/01/13 20:16:07     interval ........ 1
2022/01/13 20:16:07     once ............ false
2022/01/13 20:16:07     printSettings ... true
2022/01/13 20:16:07     completeStop .... false
2022/01/13 20:16:07     updateLog ....... 
2022/01/13 20:16:07 Building docker compose overview...
2022/01/13 20:16:18 Found 1 compose files with 9 watched containers.
2022/01/13 20:16:18 Trying to update containers...
2022/01/13 20:16:18 Processing compose file /home/docker/dir/docker-compose.yml
2022/01/13 20:16:18 Pulling for service esphome ... 
2022/01/13 20:16:18 Failed
2022/01/13 20:16:18 Pulling for service unifi_controller ... 
2022/01/13 20:16:18 Failed
2022/01/13 20:16:18 Pulling for service tasmoadmin ... 
2022/01/13 20:16:18 Failed
2022/01/13 20:16:18 Pulling for service mariadb ... 
2022/01/13 20:16:18 Failed
2022/01/13 20:16:18 Pulling for service appdaemon ... 
2022/01/13 20:16:19 Failed
2022/01/13 20:16:19 Pulling for service zigbee2mqtt ... 
2022/01/13 20:16:19 Failed
2022/01/13 20:16:19 Pulling for service eclipse_mosquitto ... 
2022/01/13 20:16:19 Failed
2022/01/13 20:16:19 Pulling for service dozzle ... 
2022/01/13 20:16:19 Failed
2022/01/13 20:16:19 Pulling for service homeassistant ... 
2022/01/13 20:16:19 Failed
2022/01/13 20:16:19 Updating docker compose overview...
2022/01/13 20:16:30 Skipping Restart /home/docker/dir/docker-compose.yml
2022/01/13 20:16:30 Done.
2022/01/13 20:16:30 Waiting 1 minutes until next execution...

Docker compose:

 watcher:
    image: virtualzone/compose-updater
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /home/docker/:/home/docker
      - /home/ubuntu/.docker/config.json:/root/.docker/config.json
    environment:
      INTERVAL: 60

The CLEANUP env is being ignored

I'm using Docker Compose to run this image.
Because the docker system prune -a -f command used for cleanup is a bit overkill for me (it deletes manual created networks), I decided to add the CLEANUP env.

Unfortunately it doesn't work / is ignored.

Here's my docker-compose.yml:

version: '3'

services:
  compose-updater:
    container_name: "compose-updater"
    image: virtualzone/compose-updater
    restart: unless-stopped
    network_mode: none
    volumes:
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "/data/docker:/data/docker:ro"
    environment:
      INTERVAL: 720
      CLEANUP: 0

Output of docker logs is this:

2021/08/13 17:15:35 Compose Updater 1.1.2
2021/08/13 17:15:35 Using settings:
2021/08/13 17:15:35     cleanup ......... true
2021/08/13 17:15:35     dry ............. false
2021/08/13 17:15:35     help ............ false
2021/08/13 17:15:35     interval ........ 720
2021/08/13 17:15:35     once ............ false
2021/08/13 17:15:35     printSettings ... true
2021/08/13 17:15:35     updateLog .......
2021/08/13 17:15:35 Building docker compose overview...
2021/08/13 17:15:37 Found 6 compose files with 6 watched containers.
2021/08/13 17:15:37 Trying to update containers...

I'm not sure where to look exactly for a possible fix.

Also as an idea for enhancements:
Maybe a fine grained control what gets cleaned up would be better in some cases.

Could not parse compose YAML: exit status 14

docker-compose parameter env_file: file.env have causing error

watcher_1    | 2022/05/13 22:34:08 Gathering details about running containers...
watcher_1    | 2022/05/13 22:34:08 Could not parse compose YAML: exit status 14

example:

 redis:
    image: redis:alpine
    restart: always
    env_file: file.env
    labels:
      - docker-compose-watcher.watch=1
      - docker-compose-watcher.dir=/home/docker

Does not work with private registry

Since I'm using a self hosted registry for my docker images this error occurs:

2021/11/25 23:00:54 Building docker compose overview...
2021/11/25 23:00:55 Found 1 compose files with 2 watched containers.
2021/11/25 23:00:55 Trying to update containers...
2021/11/25 23:00:55 Processing compose file /root/demov1/docker-compose.yml
2021/11/25 23:00:56 Pulling for service frontend ... 
2021/11/25 23:00:57 Failed
2021/11/25 23:00:57 Pulling for service api ... 
2021/11/25 23:00:58 Failed
2021/11/25 23:00:58 Updating docker compose overview...
2021/11/25 23:00:59 Skipping /root/demov1/docker-compose.yml
2021/11/25 23:01:00 Done.

I would love to get a solution for this problem.

EDIT: docker host is logged in and can pull the services.

A location of a docker-compose file with a compose-updater watcher

Guys, please, mention in the README.md file that a docker-compose file with watcher mustn't be placed in the same directory that a docker-compose file with target service. Otherwise, they will both shut down on the update with 0 (zero) code and no additional logs. I wasted more than an hour to understand it.

P.S.
Thanks for this service!

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.