blockshiftnetwork / dokku-pocketbase

Install Pocketbase on Dokku a Heroku Alternative
MIT License
14 stars 8 forks source link

How to update pocketbase version on already-deployed instance #1

Closed kleutzinger closed 1 week ago

kleutzinger commented 4 months ago

I had already deployed pocketbase via your repo a while back, so I had an old version of pocketbase running. I wanted to update it. I tried some of the steps in your README, but found a different way to do it that worked.

# below did not work. It did rebuild pocketbase, but only with the default 0.22.4 version.
# dokku config:set pocketbase POCKETBASE_VERSION=0.22.12
# dokku git:sync --build pocketbase https://github.com/AlexR1712/dokku-pocketbase

# below did work to get the desired version.
dokku docker-options:add pocketbase build '--build-arg POCKETBASE_VERSION=0.22.12'
dokku git:sync --build pocketbase https://github.com/AlexR1712/dokku-pocketbase

I think it's because of how env vars work in Dockerfile deployments. See the official dokku docs here: https://dokku.com/docs~v0.11.6/deployment/methods/dockerfiles/#build-time-configuration-variables

I'm on dokku version 0.34.4

AlexR1712 commented 4 months ago

Hi @kleutzinger I will take a look at this.

However, can you confirm that the commands you are running match the version of dokku you are using, as the link you provided is for previous versions?

Also please take a look at this page: https://pockethost.io/docs/usage/upgrading/ if you find useful.

A safer option might be to rebuild the application with the version you want to use and just copy the data/settings in a new dokku app.

kleutzinger commented 4 months ago

https://dokku.com/docs/deployment/builders/dockerfiles/#build-time-configuration-variables

Oops I did accidentally link an old version of the docs, but I think it's all the same for this.

The reason I do it this way is because I find it easier to deploy with git:sync rather than cloning locally, modifying, and deploying that. Maybe that's not the safest, but it is convenient.

AlexR1712 commented 1 week ago

I just added more information in the readme.md based on your feedback. Thank you @kleutzinger