How to use Docker to build the Chinese version of gitlab Community
In this issue, Xiaobian will bring you about how to use Docker to build a Chinese version of the gitlab community. The article is rich in content and analyzed and described from a professional perspective. After reading this article, I hope you can gain something.
First, use Docker Compose to configure startup
If you don't know Docker Compose, please see my blog post "Teach you how to install and use Docker Compose"
1. Create docker-compose.yml file in/root directory
Create docker-compose. yml file using vi docker-compose. yml (here file location can be modified according to your preferences)
The docker-compose.yml file is as follows
version: '2'services: gitlab: image: 'twang2218/gitlab-ce-zh:11.1.4' restart: unless-stopped #Please change gitlab.example.com:8888 to your server ip/domain name: port number hostname: 'gitlab.example.com:8888' environment: TZ: 'Asia/Shanghai' GITLAB_OMNIBUS_CONFIG: | #Please change http://gitlab.example.com:8888 to your server ip/domain name: port number external_url 'http://gitlab.example.com:8888' gitlab_rails['time_zone'] = 'Asia/Shanghai' #The configuration that needs to be configured in gitlab.rb can be configured here, one line for each configuration, note the indentation. #For example, the following email configuration: # gitlab_rails['smtp_enable'] = true # gitlab_rails['smtp_address'] = "smtp.exmail.qq.com" # gitlab_rails['smtp_port'] = 465 # gitlab_rails['smtp_user_name'] = "xxxx@xx.com" # gitlab_rails['smtp_password'] = "password" # gitlab_rails['smtp_authentication'] = "login" # gitlab_rails['smtp_enable_starttls_auto'] = true # gitlab_rails['smtp_tls'] = true # gitlab_rails['gitlab_email_from'] = 'xxxx@xx.com' ports: - '8888:8888' - '8443:443' - '822:22' volumes: - config:/etc/gitlab - data:/var/opt/gitlab - logs:/var/log/gitlabvolumes: config: data: logs:
The configuration content here is taken from hub.docker.com/r/twang2218/gitlab-ce-zh
3. Use docker-compose up -d to start the container (if there is no local image to use, it will be automatically pulled), and use docker-compose down to stop the service.
4. Use docker ps -a to view container operation
5, access your server IP/domain name: port number, see the following page to succeed (the first time you need to set a password)
Note: If you visit the 502 page, please don't worry, because gitlab will take some time to start, wait a few minutes and refresh the page to see it
The above is how to use Docker to build a Chinese version of the gitlab community shared by Xiaobian. If you happen to have similar doubts, you may wish to refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.