i have the following docker imgage gitlab/gitlab-ce
to make a local Gitlab server
and i have the following docker-compose file:
git:
container_name: git-server
image: 'gitlab/gitlab-ce:latest'
hostname: 'gitlab.example.com'
ports:
- '8090:80'
volumes:
- '/srv/gitlab/config:/etc/gitlab'
- '/srv/gitlab/logs:/var/log/gitlab'
- '/srv/gitlab/data:/var/opt/gitlab'
networks:
- net
when i do docker-compose up
after a minute i get this error Upgrade failed. Retry the upgrade after migrating your data to hashed storage.
and the container exited.
how to solve this problem?
The solution is to migrate to hashed storage
after the creation of the Gitlab server container
and before creating any groups or projects in Gitlab.
Use the following command inside Gitlab server:
Omnibus installation:
sudo gitlab-rake gitlab:storage:migrate_to_hashed
Source installation:
sudo -u git -H bundle exec rake gitlab:storage:migrate_to_hashed RAILS_ENV=production
Now you can find your groups and projects under @hashed
folder.
For information on interpreting the relative path, see: https://0xacab.org/help/administration/repository_storage_types.md#translate-hashed-storage-paths