Git Product home page Git Product logo

Comments (4)

ReinerNippes avatar ReinerNippes commented on July 27, 2024

Just wait. There is a container called watchtower. It will update all images.

If you don't want that. Or fine tune it a bit.

In group_vars/all.yml you can define which image version will be used.
e.g. with docker_postgres_image: 10-alpine watchtower will update postgres release 10 based on alpine. actual this is 10.11-alpine. if there will be a version 10.12-alpine you'll get the update. updates of the underlying alpine images are also included.

here

command: --cleanup --schedule "0 0 0 * * *"

you find the schedule for watchtower.

find these container labels

com.centurylinklabs.watchtower.enable: "true"

to turn on and off the auto update of each container.

don't update traefik to version 2. the config is incompatible with version 1.7.

if you want to upgrade a container image like postgres or redis. make a backup. change the image version in group_vars/all.yml and just run this role

- docker_container

copy nextdocker.yml and delete all other roles.

it should be safe to just run nextcdocker.yml without modification because the playbook should be idempotent. but this not tested very well.

from nextcloud_on_docker.

 avatar commented on July 27, 2024

Perfect. I wasn't sure if the nextcloud container had the watchtower label but using docker inspect I can see it's got it. 😄 Thanks for the thorough answer.

from nextcloud_on_docker.

tzmemo avatar tzmemo commented on July 27, 2024

If I may chime in here, I also saw the update from 18.0.0 to 18.0.1 today, but I cant find a label on nextcloud:fpm-alpine:

$ grep com.centurylinklabs.watchtower.enable roles/docker_container/tasks/*
roles/docker_container/tasks/adminer.yml:      com.centurylinklabs.watchtower.enable:         "true"
roles/docker_container/tasks/collabora.yml:        com.centurylinklabs.watchtower.enable:            "true"
roles/docker_container/tasks/database.yml:          com.centurylinklabs.watchtower.enable:         "true"
roles/docker_container/tasks/database.yml:          com.centurylinklabs.watchtower.enable:         "true"
roles/docker_container/tasks/nginx.yml:      com.centurylinklabs.watchtower.enable:            "true"
roles/docker_container/tasks/onlyoffice.yml:        com.centurylinklabs.watchtower.enable:            "true"
roles/docker_container/tasks/portainer.yml:      com.centurylinklabs.watchtower.enable: "true"
roles/docker_container/tasks/redis.yml:      com.centurylinklabs.watchtower.enable:         "true"
roles/docker_container/tasks/traefik.yml:      com.centurylinklabs.watchtower.enable:         "true"
roles/docker_container/tasks/traefik.yml:      com.centurylinklabs.watchtower.enable: "true"

$ docker inspect nextcloud:fpm-alpine |grep -i labels -A2
            "Labels": {},
            "StopSignal": "SIGQUIT"
        },
--
            "Labels": null,
            "StopSignal": "SIGQUIT"
        },

So I tried to add the watchtower.enable line next to the nextcloud_traefik_label, but then Ansible bailed out with syntax errors.

Finally I removed the image and ran nextcloud.yml, so it pulled the new image, but why isn't it using watchtower?

from nextcloud_on_docker.

ReinerNippes avatar ReinerNippes commented on July 27, 2024

Sorry. The nextcloud container is different. Because there are two possible images. fpm-php and apache. The later has traefik labels. If you run fpm-php these labels apply to the nginx container.

Therefore the nextcloud container labels are here in variable

The switch which labels are used is coded here.

"{{ nextcloud_traefik_label['nginx' if ( 'fpm' in docker_nextcloud_image ) else 'apache'] }}"

from nextcloud_on_docker.

Related Issues (20)

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.