zengxs / gitlab-arm64

GitLab docker image (CE & EE) for arm64
Apache License 2.0
154 stars 29 forks source link

Correct Procedure to update version #142

Open gino8080 opened 1 month ago

gino8080 commented 1 month ago

Please can you describe the steps to make a correct update procedure?

my docker-compose is like this

version: '3.6'
services:
  gitlab:
    image: 'zengxs/gitlab:latest'
    restart: always
    container_name: gitlab
    hostname: '*********.it'
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'https://**********.it'

        gitlab_rails['gitlab_shell_ssh_port'] = 2222
        letsencrypt['enabled'] = false
        gitlab_rails['gitlab_protocol'] = 'https'
        gitlab_rails['gitlab_https'] = false
    expose:
      - '80'
    ports:
      - '8081:80'
      - '2222:22'
    networks:
      - int
    volumes:
      - './config:/etc/gitlab'
      - './data:/var/opt/gitlab'
      - './logs:/var/log/gitlab'

networks:
  int:
    external: true

I tried stopping and restarting container but did not worked

zengxs commented 1 month ago

To update your GitLab instance, you only need to change the image version in your docker-compose.yml file. For example, if you want to upgrade to version 16.4.0-ce, follow these steps:

  1. Modify the docker-compose.yml file to change the image line to:
    image: zengxs/gitlab:16.4.0-ce
  2. Stop all containers and then restart them.
    docker compose down   // stop container
    docker compose up -d  // restart container

Please note that you can only upgrade from one minor version to the next (e.g., from 16.4.x to 16.5.x). If you need to upgrade across multiple minor versions (e.g., from 16.4.x to 16.7.x), you must do so step by step: 16.4.x16.5.x16.6.x16.7.x. This is a limitation of GitLab itself. For more information, please refer to the official documentation: GitLab Upgrade Paths.

gino8080 commented 1 month ago

Thank you, I will retry following these steps.

I'm doing a minor upgrade from v17.4.1 to latest (v17.5)

I tried using these steps before:

  1. docker pull zengxs/gitlab:latest
  2. then later docker-compose down
  3. then docker-compose up

but after an infinite logs the system didn't started correctly apparently without any error...

I saw a new folder with ssl and some certificates inside the mapped ./config, but I'm using it behind another nginx proxy with correct certificates, so I don't know what's happened :(

zengxs commented 1 month ago

Thank you for the update. It sounds like you might be experiencing an issue during the upgrade process. Without logs, I can only make some guesses. It’s possible that GitLab is in the middle of a migration during the upgrade, which can sometimes take over 10 minutes.

Could you please provide the logs from the GitLab container? This will help me diagnose the issue further.