arangodb-docker icon indicating copy to clipboard operation
arangodb-docker copied to clipboard

autoupgrade support by environment variable

Open prabirshrestha opened this issue 5 years ago • 3 comments

prabirshrestha avatar Sep 02 '19 19:09 prabirshrestha

Or, at least, can you document a way to upgrade easily?

brice avatar Oct 22 '19 09:10 brice

As a workaround, I was able to wrap the entrypoint.sh with my own to perform an upgrade on every restart of the container by deriving my own dockerfile:

FROM arangodb:3.6.1

ENV ARANGO_STORAGE_ENGINE rocksdb
ENV ARANGO_RANDOM_ROOT_PASSWORD 1

RUN mv /entrypoint.sh /arango-entrypoint.sh

COPY docker/api-entrypoint.sh /entrypoint.sh

RUN chmod +x /arango-entrypoint.sh /entrypoint.sh

and api-entrypoint.sh:

#!/bin/sh
set -e
if [ -f /var/lib/arangodb3/SERVER ]; then
    export ARANGO_INIT_ENDPOINT=tcp://127.0.0.1:8999 # Not sure if this is strictly necessary

    arangod --config /etc/arangodb3/arangod.conf \
            --server.endpoint $ARANGO_INIT_ENDPOINT \
            --database.auto-upgrade true
fi

. /arango-entrypoint.sh $@

I think it would be nice if ArangoDB standalone had an option like the cluster coordinators have with online to perform an upgrade-and-reboot (or even just the upgrade if the reboot is no longer required?) iff necessary and otherwise just carry on as usual. Right now there's only auto-upgrade true and that forces a shutdown regardless of whether an update actually happened or not. /cc @fceller @joerg84

pluma avatar Feb 16 '20 17:02 pluma

Why hasn't this option been added? It's a bit ridiculous that this was requested 3 years ago and yet there's no easy way to upgrade when running the stock Docker image.

nickcodefresh avatar Mar 21 '22 22:03 nickcodefresh