将docker gitlab图像升级到8.6会破坏gitlab

时间:2016-03-24 10:48:32

标签: docker gitlab

gitlab docker image更新到8.6版之后:
docker-compose pull
docker-compose up -d

gitlab返回http 500

gitlab docker image 8.6似乎已经破了。

1 个答案:

答案 0 :(得分:2)

这是解决方案:

docker exec -it gitlab_web_1 /bin/bash

sudo -u gitlab-psql -i bash

/opt/gitlab/embedded/bin/psql --port 5432 -h /var/opt/gitlab/postgresql -d gitlabhq_production

gitlabhq_production=# CREATE EXTENSION IF NOT EXISTS pg_trgm;

gitlabhq_production=# SELECT true AS enabled FROM pg_available_extensions WHERE name = 'pg_trgm' AND installed_version IS NOT NULL;

\--------- t (1 row)
exit

数据库迁移:

gitlab-rake db:migrate

重启docker container:

docker-compose stop;docker-compose up -d

在浏览器中点击刷新。