skip to Main Content

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?

2

Answers


  1. Chosen as BEST ANSWER

    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


  2. This error could appear also, when you have no connection to configured external postgresql database. Then check next section at your gitlab.rb:

    # Fill in the values for database.yml
    gitlab_rails['db_adapter'] = 'postgresql'
    gitlab_rails['db_encoding'] = 'utf8'
    gitlab_rails['db_host'] = '172.22.22.7'
    gitlab_rails['db_port'] = '5432'
    gitlab_rails['db_username'] = 'gitlab'
    gitlab_rails['db_password'] = '***'
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search