Hi. I self-host gitea in docker and have a few repos, users, keys, etc. I installed forgejo in docker and it runs, so I stopped the container and copied /var/lib/docker/volumes/gitea_data/_data/* to /var/lib/docker/volumes/forgejo_data/_data/, but when I restart the forgejo container, forgejo doesn’t show any of my repos, users, keys, etc.

My understanding was the the current version of forgejo is a drop-in replacement for gitea, so I was hoping all gitea resources were saved to its docker volume and would thus be instantly usable by forgejo. Guess not. :(

Does anyone have any experience migrating their gitea instance to forgejo?

  • Mike Wooskey@lemmy.d.thewooskeys.comOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 months ago

    I don’t know if your problem is the same as mine was, but the symptom sounds the same.

    The docker-compose.yaml file shown in the Forgejo documentation for docker installation shows this mount:

        volumes:
          - ./forgejo:/data
    

    For me, Forgejo installed and created new resource files in /data and ignored the resource files gitea alread made.

    I changed the volume to:

        volumes:
          - data:/var/lib/gitea
    

    Forgejo then recognized the gitea resources.

    • lal309@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 months ago

      Not quiet. I was running gitea before so my mount was ./gitea:/data but since switching over to forgejo, I renamed my ./gitea directory to ./forgejo. Adjusted my compose file to have a mount of ./forgejo:/data.

      Now inside of that renamed forgejo directory, there are a bunch of gitea references and even one more directory called gitea. When I migrated everything worked right away but since I wanted a cleaner transition, I renamed and switched all gitea references to forgejo but went I brought the stack back online, it went belly up.

      As a troubleshooting step, I recreated my compose file and created a new empty ./forgejo on a different machine just to see what a new and fresh install would look like and the forgejo stack itself created all kinds of gitea references and gitea directory once I brought it up. So to fix my original deployment, I reverted all the references back from forgejo to gitea and everything worked again.

      For fun, I went out to codeberg to look at the Dockerfile and saw that they had a bunch of gitea things within their own Dockerfile so nothing I can do for now