when I install gitlab-ce through docker on m1 mac mini, it stucks on gitlab::database::migrations
Asked Answered
T

1

6

this is my run commad:

sudo docker run --detach \
  --hostname localgitlab.com \
  --publish 9443:443 --publish 9980:80 --publish 9922:22 \
  --name gitlab \
  --restart always \
  --volume ~/gitlab/config:/etc/gitlab: \
  --volume ~/gitlab/logs:/var/log/gitlab: \
  --volume ~/gitlab/data:/var/opt/gitlab: \
  --platform linux/amd64 --privileged=true \
  gitlab/gitlab-ce:latest

but it stops here

Recipe: gitlab::database_migrations

  * ruby_block[check remote PG version] action nothing (skipped due to action :nothing)

  * rails_migration[gitlab-rails] action run

I'm not sure if I can use a m1 mac as a gitlab server?

And I set up gitlab successful on my inter chip mac.

Anybody knows the reason?

Tonguing answered 12/10, 2021 at 3:32 Comment(3)
I'm having the same problem. No url and nothingAnh
March 2022, I'm still facing the same issue, Did anyone of you guys figure out the error?Grog
Same problem here and seemingly there is no solution yetBashemeth
S
2

There is a post in Gitlab forums discussing this but there is no solution.

The only solution I found so far is to use the yrzr/gitlab-ce-arm64v8 image instead of the official GitLab one. This image is built with arm64 compatibility and released at the same time as the official image.

A similar image with the EE version of GitLab is here gsdukbh/gitlab-ee-arm64, it is maintained but it doesn't contain all the versions.

BTW, this is my docker-compose.yml tested on a Mac M1 if you want to give it a try:

version: "3.4"
services:
  gitlab:
    image: 'yrzr/gitlab-ce-arm64v8'
    restart: always
    hostname: 'gitlab.local'
    container_name: gitlab-ce
    privileged: true
    depends_on:
      - postgresql
    links:
      - postgresql:postgresql
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        postgresql['enable'] = true
        gitlab_rails['db_username'] = "gitlab"
        gitlab_rails['db_password'] = "gitlab"
        gitlab_rails['db_host'] = "postgresql"
        gitlab_rails['db_port'] = "5432"
        gitlab_rails['db_database'] = "gitlabhq_production"
        gitlab_rails['db_adapter'] = 'postgresql'
        gitlab_rails['db_encoding'] = 'utf8'
        external_url 'http://gitlab.local'
    ports:
      - "8080:80"
      - "8043:443"
      - "8022:22"
    volumes:
      - ./gitlab-config:/etc/gitlab
      - ./gitlab-logs:/var/log/gitlab
      - ./gitlab-data:/var/opt/gitlab
  postgresql:
    restart: always
    image: postgres:13.6-alpine
    container_name: gitlab-postgres
    environment:
      - POSTGRES_USER=gitlab
      - POSTGRES_PASSWORD=gitlab
      - POSTGRES_DB=gitlabhq_production
      - TZ=America/Bogota
      - PGDATA=/data
    volumes:
      - ./gitlab-db-data:/data
    ports:
      - "5432:5432"
Sly answered 1/7, 2022 at 12:58 Comment(1)
I tried to use your yml file, but postgres is logging errors: gitlab-ce | 2023-10-23_15:18:36.24631 LOG: could not set permissions of file "/var/opt/gitlab/postgresql/.s.PGSQL.5432": Invalid argument gitlab-ce | 2023-10-23_15:18:36.24640 WARNING: could not create Unix-domain socket in directory "/var/opt/gitlab/postgresql" gitlab-ce | 2023-10-23_15:18:36.24651 FATAL: could not create any Unix-domain sockets gitlab-ce | 2023-10-23_15:18:36.24951 LOG: database system is shut downBarbrabarbuda

© 2022 - 2024 — McMap. All rights reserved.