Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.

SOLVED Upgrading stopped applications is currently impossible

  • I think that if there's no technical limitations making it impossible, it might make sense to allow upgrading of a stopped application.

    Background: while working on a custom application, I introduced a (bad) problem. I stopped the application while I worked on deploying a fix, only to run into this:

    Failed to update app: 409 message: Stopped apps cannot be updated

    This meant that I had to restart the (constantly failing) application to be able to upgrade it. This might be more problematic if there was something seriously bad going on with the application.

    (I don't think this is too important, but reporting it anyway).

  • Staff

    @Robin The technical limitation is with the way we package our apps. We have a start script that runs when the container starts and this script does the data migration (database + file system layout etc). Most apps don't support jumping from version 1 to say version 3. They are mostly designed for rolling updates. So, if an app was installed on version 1, then stopped and went through many updates and started up at version 3, it's not going to work.

    As a thought experiment, maybe one idea is to have a separate update script that is not attached the startup script. But I haven't seen this pattern before in the container world (this is the norm in dpkg/apt/rpm of course). If there is, please let me know.

  • Staff

    Err sorry, I totally missed that you are developing a custom app 🙂

    As you found out, you have to start the app to update it. If you don't want that, you can put the app in "repair mode". What this mode does is essentially starts up the container but in paused state (cloudron start && cloudron repair). This way once the app is in repair mode, you can cloudron exec and run the start script manually. You can also do cloudron update on apps in repair state.

  • Yes, I think repair would work just fine. I'll give that a shot next time I run into this.

    The upgrade process makes sense, as you say, working on custom applications is a bit of a special usecase 🙂