Infrastructure/Git

install gitlab

light_meal 2023. 3. 18. 11:23
728x90

install docker

https://docs.docker.com/engine/install/ubuntu/

 

Install Docker Engine on Ubuntu

 

docs.docker.com

  • docker compose도 같이 설치 되었는지 확인

 

install gitlab

https://docs.gitlab.com/ee/install/docker.html

 

GitLab Docker images | GitLab

Documentation for GitLab Community Edition, GitLab Enterprise Edition, Omnibus GitLab, and GitLab Runner.

docs.gitlab.com

 

create docker compose file

mkdir docker-compose.yml
  • host ip address 본인 주소 입력 or 도메인명 입력
version: '3.6'
services:
  web:
    image: 'gitlab/gitlab-ee:latest'
    restart: always
    hostname: '{host ip address}'
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url '{host ip address}'
        gitlab_rails['gitlab_shell_ssh_port'] = 10022
        # Add any other gitlab.rb configuration here, each on its own line
    ports:
      - '8929:8929'
      - '10080:80'
      - '10443:443'
      - '10022:22'
    volumes:
      - '$GITLAB_HOME/config:/etc/gitlab'
      - '$GITLAB_HOME/logs:/var/log/gitlab'
      - '$GITLAB_HOME/data:/var/opt/gitlab'
    shm_size: '256m'

 

check root password

sudo docker exec -it bin_web_1 grep 'Password:' /etc/gitlab/initial_root_password

 

exec gitlab

<http://gitlab.example.com:8929>
728x90