dokku / dokku-mongo

a mongo plugin for dokku
MIT License
174 stars 32 forks source link

Document the correct way to upgrade the plugin and mongodb. #74

Closed dblock closed 7 years ago

dblock commented 8 years ago

What's the correct way to upgrade the plugin and mongodb inside all/each container?

josegonzalez commented 8 years ago

Cry.

Depends on the versions you are upgrading between. I think minor/patch should be something like:

dokku mongo:stop SERVICE
docker rm $(dokku mongo:info SERVICE --id)
MONGO_IMAGE_VERSION=derp dokku mongo:start SERVICE

If you need more than that, I'd checkout the upgrade docs from mongo. You should be able to export your data and import it elsewhere. I haven't used Mongo in a while, so ymmv.

dblock commented 8 years ago

I feel like this should be reopened. I am a noob when it comes to dokku/docker (and therefore I use dokku) so it's hard to know where to start or what derp is ;) For the actual mongodb part we can leave it as "check the mongodb docs".

I will try to contribute the doc, but no promises ;)

josegonzalez commented 8 years ago

Derp is the image version. Our default is here, and currently 3.2.9. The image version is quite literally the docker image version, as listed here.

If you can contribute doc updates for this by end of week, great, otherwise I'll close it again.

figalex commented 8 years ago

How can I now which version of the plugin I have and how can I upgrade the plugin? The version I have installed by default was using MongoDB 3.2.1, I was able to use a later version of Mongo but only destroying and recreating a database. I would like to upgrade the plugin.

josegonzalez commented 7 years ago

The plugin itself doesn't currently have a defined version, though once we start versioning (soonish) it'll be from:

dokku plugin:list
dblock commented 6 years ago

This worked from 3.2.9 to 3.4.9. I first ran dokku plugin:mongo update then what's above.

dokku mongo:stop 33-minutes
=====> Stopping container
       Container stopped
root@dblock-plum:/var/log/dokku# dokku mongo:info 33-minutes --id
6a56353106a3c3559e62b29f447891239dc82fa4166d711dc41cdf9051bd8b4c
root@dblock-plum:/var/log/dokku# docker rm 6a56353106a3c3559e62b29f447891239dc82fa4166d711dc41cdf9051bd8b4c
6a56353106a3c3559e62b29f447891239dc82fa4166d711dc41cdf9051bd8b4c
root@dblock-plum:/var/log/dokku# MONGO_IMAGE_VERSION=3.4.9 dokku mongo:start 33-minutes
=====> Starting container
       Waiting for container to be ready

Published https://code.dblock.org/2018/07/27/installing-and-upgrading-mongodb-in-dokku.html, hope this helps someone.

styfrombrest commented 2 years ago

I'm trying to upgrade from 3.6.15 to the 3.6.23, I did the same steps as @dblock described, but I still have 3.6.15. What I'm doing wrong? Plugin's version is the latest - 1.14.2. Thanks.

josegonzalez commented 2 years ago

@styfrombrest since this is an older issue, mind filing a new request with all the information in the issue template? I can help you there.