ÁÄÁÄ°²ÅÅGitLabµÄÁ÷³ÌºÍ×¢ÖØÊÂÏî
Ëæ×ÅÏÖ½ñ¹¤³ÌÖÎÀíµÄ¿ìËÙÉú³¤£¬°æ±¾¿ØÖÆϵͳҲԽÀ´Ô½Ö÷Òª¡£gitÊÇÒ»¸öÏÖÔÚºÜÊÇÊ¢ÐеÄÂþÑÜʽ°æ±¾¿ØÖƹ¤¾ß¡£gitlabÔòÊÇgitµÄwebÖÎÀí½çÃæ¡£ËüÊÇÒ»¸öÍêÕûµÄdevopsƽ̨£¬¿ÉÒÔÈÃÍŶÓÐ×÷Ô½·¢Àû±ã£¬´úÂëÖÎÀíÔ½·¢±ã½Ý¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«»áÏÈÈÝ°²ÅÅgitlabµÄÁ÷³ÌºÍ×¢ÖØÊÂÏî¡£
Ò»¡¢×°Öò¢ÉèÖÃËùÐèµÄÈí¼þ
ÔÚ×îÏÈ×°ÖÃGitLab֮ǰ£¬ÎÒÃÇÐèÒªÏÈ×°Öò¢ÉèÖÃDockerºÍDocker-compose¡£ÕâÁ½¸öÈí¼þ¶¼ÐèҪƾ֤²î±ðµÄ²Ù×÷ϵͳ¾ÙÐÐÏìÓ¦µÄÉèÖá£ÔÚ×°ÖÃÍê³Éºó£¬ÎÒÃÇÐèÒªÔÚϵͳÖÐÉèÖÃDockerºÍDocker-composeµÄÇéÐαäÁ¿£¬Àû±ãºóÐøµÄʹÓá£
¶þ¡¢½¨ÉèGitLabÈÝÆ÷
ÔÚ×°ÖÃËùÐèÈí¼þ²¢ÉèÖÃÇéÐαäÁ¿ºó£¬ÎÒÃÇ¿ÉÒÔ×îÏȽ¨ÉèGitLabÈÝÆ÷¡£Ê¹ÓÃDocker-compose¾ÙÐÐGitLabÈÝÆ÷µÄ°²ÅźÜÊǼòÆÓ£¬Ö»ÐèÒªÔÚÄ¿½ñĿ¼Ï½¨ÉèÒ»¸ödocker-compose.ymlÎļþ£¬È»ºóÌîÈëÒÔÏÂÄÚÈݼ´¿É£º
version: ‘3’
services:
web:
image: 'gitlab/gitlab-ce:latest' restart: always hostname: 'gitlab.example.com' environment: GITLAB_OMNIBUS_CONFIG: | external_url 'http://gitlab.example.com' gitlab_rails['gitlab_shell_ssh_port'] = 22 ports: - '80:80' - '443:443' - '22:22' volumes: - '/srv/gitlab/config:/etc/gitlab' - '/srv/gitlab/logs:/var/log/gitlab' - '/srv/gitlab/data:/var/opt/gitlab' network_mode: host
µÇ¼ºó¸´ÖÆ
ÔÚÕâ¸ödocker-compose.ymlÎļþÖУ¬ÎÒÃÇÖ¸¶¨ÁËËùÐèµÄDocker¾µÏñ¡¢ÈÝÆ÷µÄÖ÷»úÃû¡¢¶Ë¿Ú¡¢¹ÒÔØĿ¼µÈ²ÎÊý¡£¿ÉÒÔƾ֤ÐèÒª¾ÙÐÐ×Ô½ç˵ÉèÖá£
Èý¡¢Æô¶¯GitLabÈÝÆ÷
Æô¶¯GitLabÈÝÆ÷ºÜÊǼòÆÓ£¬Ö»ÐèÒªÔÚÄ¿½ñĿ¼ÏÂÔËÐÐÒÔÏÂÏÂÁî¼´¿É£º
docker-compose up -d
Õâ¸öÏÂÁ»á×Ô¶¯Æô¶¯GitLabÈÝÆ÷£¬²¢ÔÚºǫ́ÔËÐС£
ËÄ¡¢ÉÏ°¶ºÍʹÓÃGitLab
Ò»µ©GitLabÈÝÆ÷Æô¶¯Àֳɣ¬ÎÒÃÇ¿ÉÒÔͨ¹ýä¯ÀÀÆ÷»á¼û http://gitlab.example.com ¾ÙÐлá¼û¡£ÔÚµÚÒ»´Î»á¼ûʱ£¬ÏµÍ³»áÒªÇóÎÒÃÇÉèÖÃÖÎÀíÔ±Õ˺źÍÃÜÂ룬ÒÔ¼°ÆäËûһЩϵͳÉèÖá£ÉèÖÃÍê³Éºó£¬¼´¿É×îÏÈʹÓÃGitLab¡£
×ܽ᣺
ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ²ÊöÁËÔõÑùʹÓÃDocker-compose°²ÅÅGitLab£¬²¢ÌṩÁËÒ»¸ö¼òÆÓµÄdocker-compose.ymlÄ£°å¡£Òª×¢ÖØÉèÖúÃËùÐèµÄÈí¼þºÍÇéÐαäÁ¿£¬È·ÈÏÈÝÆ÷½¨Éè²ÎÊý׼ȷÎÞÎó£¬È»ºóÔËÐÐGitLabÈÝÆ÷²¢ÉÏ°¶Ê¹Óá£Í¨¹ýGitLabÖÎÀíÍŶӵĿª·¢ÊÂÇ飬Ð×÷ЧÂʽ«´ó´óÌá¸ß¡£
ÒÔÉϾÍÊÇÁÄÁÄ°²ÅÅGitLabµÄÁ÷³ÌºÍ×¢ÖØÊÂÏîµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡