fork 0k-charms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Valentin Lab aca5e6e10d new: [mariadb] upgrade to ``10.3.25``. 4 years ago
..
hooks fix: dev: [rocketchat,mongo] do not use ``$PROJECT_NAME`` in mongo database url. 5 years ago
README.org new: doc: [rocketchat] added some update docs. 4 years ago
metadata.yml chg: [rocketchat] update to ``3.8.0``. 4 years ago

README.org

Rocket.Chat

Updating the charm to a new version

We are using official image. Latest tags usually. You can double-check available candidate for official images like this:

docker search rocket.chat

So we usually pull and test images like this :

docker pull rocket.chat:X.Y.Z

This worked on 3.6.3, but changed before 3.8.0 to:

docker pull rocketchat/rocket.chat:X.Y.Z

from: https://hub.docker.com/r/rocketchat/rocket.chat

Get the available tags:

IMAGE_BASE_NAME=rocket.chat

## lookup on docker hub only. Could think doing it for any docker
## image identifier available on `pull`. This would mean querying
## other registries, probably with a different api.
docker:lookup_available_tags() {
    local image="$1" limit="${2:-10}" filter="$3" eor p

    ## remove any tags on image name
    image="${image%%:*}"

    if [[ "$image" == *"/"* ]]; then
        username="${image%%/*}"
        image="${image##*/}"
    else
        username="library"
    fi

    p=0
    eor=
    while [ -z "$eor" ]; do
       ((p++))
       out=$(curl -s "https://registry.hub.docker.com/v2/repositories/$username/$image/tags/?page=$p" |
           jq -r '."results"[]["name"]') || break
       [ -z "$out" ] && break
       ## 10 results are expected per request, otherwise
       ## this means we are hitting End of Records.
       nb_result=$(printf "%s\n" "$out" | wc -l)
       [ "$nb_result" -lt 10 ] && eor=true
       ## filter records
       [ "$filter" ] && out=$(printf "%s\n" "$out" | egrep "$filter")
       [ -z "$out" ] && continue
       nb_result=$(printf "%s\n" "$out" | wc -l)
       if [ "$limit" -le "$nb_result" ]; then
           printf "%s\n" "$out" | head -n "$limit"
           break
       fi
       printf "%s\n" "$out"
       limit=$((limit - nb_result))
    done

}

docker:lookup_available_tags rocketchat/rocket.chat 15 "^[0-9]+(\.[0-9]+)*$"

Rocket.chat has a powerfull and working update database that will take care of migrating database on startup.