升级失败。将数据迁移到哈希存储后重试升级
我有以下 docker image gitlab/gitlab-ce
来制作本地 Gitlab 服务器 我有以下 docker-compose 文件:
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
当我在一分钟后执行 docker-compose up 时,我收到此错误升级失败。将数据迁移到哈希存储后重试升级。 并且容器退出。 如何解决这个问题?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
解决方案是在创建
Gitlab 服务器容器
之后、在 Gitlab 中创建任何组或项目之前迁移到哈希存储
。在 Gitlab 服务器中使用以下命令:
Omnibus 安装:
sudo gitlab-rake gitlab:storage:migrate_to_hashed
源安装:
sudo -u git -H bundle exec rake gitlab:storage:migrate_to_hashed RAILS_ENV=生产
现在您可以在
@hashed
文件夹下找到您的组和项目。有关解释相对路径的信息,请参阅:
https://0xacab.org/help/administration/repository_storage_types.md #翻译哈希存储路径
The solution is to migrate to
hashed storage
after the creation of theGitlab 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
当您没有连接到配置的外部 postgresql 数据库时,也可能会出现此错误。然后检查
gitlab.rb
的下一部分:This error could appear also, when you have no connection to configured external postgresql database. Then check next section at your
gitlab.rb
: