- 追加された行はこのように表示されます。
- 削除された行はこのように表示されます。
!GitLab/Dockerふたたび
https://www.wasamon.net/miyo/index.cgi?page=Diary%2F2022%2D10%2D8
でDockerを使ってGitLabのセットアップをしていたのだけど,
パスワードを忘れてしまったので,
 docker-compose exec gitlab /bin/bash
でログインして,
 gitlab-rake "gitlab:password:reset[ユーザ名]"
と,再度セットアップ.管理者ならユーザ名はroot.
なお,ホスト再起動時にDockerなGitLabが自動的に起動してくるのは,
docker-compose.yamlで,
  restart: always
としているから.
また,同じdoocker-compose.yamlを使って別の環境で
docker composeコマンドで実行しようとしたら,
 (root) Additional property gitlab is not allowed
とおこられてしまった.
https://docs.gitlab.com/ee/install/docker.html を参考に
 version: '3.6'
 services:
   web:
     container_name: gitlab01
     image: 'gitlab/gitlab-ce:latest'
     restart: always
     hostname: 'localhost'
     environment:
       GITLAB_OMNIBUS_CONFIG: |
         external_url 'http://<IPアドレス>:12000'
         gitlab_rails['time_zone'] = 'Asia/Tokyo'
     ports:
       - '12000:12000'
       - '12222:22'
     volumes:
       - '/data/GitLab/data/config:/etc/gitlab'
       - '/data/GitLab/data/logs:/var/log/gitlab'
       - '/data/GitLab/data/data:/var/opt/gitlab'
     shm_size: '256m'
と変更.