Portainer is changing to a mostly AI and kubernetes supported app.

  • trilobite@lemmy.ml
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 day ago

    Having read this whoke thread, i feel its time to drop Portainer. I find it useful to edit the stackfile and do updates, as well as cleaning old volumes and images. Seems like Arcane and Dockhand are the most popular substitutes. Is the migration from Portainer easy?

    • Zectivi@piefed.social
      link
      fedilink
      English
      arrow-up
      4
      ·
      10 hours ago

      I just finished the migration to Dockhand. I never had to stop a single container.

      I copied out all the docker compose files portainer stored for the stacks:

      sudo rsync -a /var/lib/docker/volumes/portainer_data/_data/compose/ ~/stacks-backup/

      The bonus of doing it this way is permissions, and it also nabs the .env files if you’ve configured vars in the Stacks config (and not directly in the compose file)

      Because all the folders were just ID’s, I renamed them:

      docker ps -a --format '{{.Label "com.docker.compose.project.working_dir"}}\t{{.Label "com.docker.compose.project"}}' | sort -u | while IFS=$'\t' read -r wd name; do id="${wd##*/}"; [ -n "$id" ] && [ -d ~/stacks-backup/"$id" ] && mv ~/stacks-backup/"$id" ~/stacks-backup/"$name"; done

      After that, I ran du -sh against both directories to ensure they match.

      Once the rename was done, I settled on moving all my stack configs to /opt/stacks, and added a folder for the compose file for dockhand, because dockhand can manage itself, unlike Portainer. Additionally, I made sure the /opt/stacks folder I moved those files to was mounted by Dockhand in the compose file.

      docker compose up -d in the dockhand dir, and then went to the UI.

      Configure the env how you want, and have it point at whatever your config was. I am running everything in Ubuntu server, so I just left the default Unix stuff set.

      From there, the Stacks UI in Dockhand listed everything, but it knew nothing really about them. Pick a low-impact stack, and open it. You should see a section on the left where you can browse to /opt/stacks, for example, and if you’ve renamed the folders, easily find the yaml. Once loaded, you should see the config on the left. On the right is where you can add your env vars. If you have a .env that moved over, there’s a folder icon at the top you can use to navigate to it and pick it.

      I have 18 stacks. Start to finish was approx 1 hour. I have 14 volumes, and those are all present, including the association to the stack they belong to, and everything matches what I see in Portainer, which is still up and running alongside Dockhand.

      I hope this all helps you. Realistically, I don’t know if you’ll have an issue with volumes. All mine are managed via docker itself and not portainer, so there was nothing I needed to do there.

    • Lka1988@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      4
      ·
      16 hours ago

      I’d also recommend Dockge. Made by the same dude who does Uptime Kuma. Super simple, works along existing stacks.

    • femtek@lemmy.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      21 hours ago

      I started migrating last night. You have to stop your running instances, copy over the yaml and change the volume mounts if you used named volumes.