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?
Okay so your post inspired me to make the switch. All I had to do was switch out the image to the forgejo one. Everything worked right away. To try to make things as clean as possible, I went ahead and renamed my bind volume paths and app.ini stuff from gitea to forgejo but no matter what I tried, once I started the container, the container would create a gitea directory with a new app.ini. I even tried to run the forgejo compose on another host and the app still creates a gitea directory within the bind mount. Am I doing something wrong. I understand it’s a drop in replacement but I’m sure there’s a way to get a cleaner cut over.
compose.yml
volumes:
Host directories
~/forgejo
How do I keep forgejo from creating this gitea directory? Why doesn’t it create a forgejo directory???
Edit: gitea version was - 1.21.7 and forgejo replacement image is 1.21.7-0
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:
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.