¡¾×ܽ᡿GitLabÈÝÆ÷Æô¶¯±¨´íµÄÖÖÖÖÇéÐÎÏ¢Õù¾öÒªÁì
ÔÚʹÓÃdocker°²ÅÅgitlabµÄÀú³ÌÖУ¬¾³£»áÓöµ½Æô¶¯gitlabÈÝÆ÷ʱ±¨´íµÄÇéÐΣ¬±¾ÎĽ«ÏÈÈÝgitlabÈÝÆ÷Æô¶¯±¨´íµÄÖÖÖÖÇéÐμ°Æä½â¾öÒªÁì¡£
¶Ë¿Ú³åÍ»
Æô¶¯GitLabÈÝÆ÷ʱ£¬ÈôÊÇËÞÖ÷»úÉϵĶ˿ÚÓëÈÝÆ÷ÄڵĶ˿ڳåÍ»£¬Ôò»á±¨´í¡£½â¾ö´ËÎÊÌâµÄÒªÁì¾ÍÊÇ£¬ÔÚÆô¶¯ÈÝÆ÷µÄʱ¼ä£¬Ö¸¶¨Ò»¸öËÞÖ÷»úÉϵÄδ±»Õ¼ÓõĶ˿ڡ£ÀýÈ磺
docker run -d -p 8080:80 -p 2222:22 -v /path/to/gitlab/config:/etc/gitlab -v /path/to/gitlab/logs:/var/log/gitlab -v /path/to/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬-p²ÎÊýÖ¸¶¨ÁËÈÝÆ÷ÄڵĶ˿ÚÓëËÞÖ÷»úÉϵĶÔÓ¦¶Ë¿Ú£¬-v²ÎÊýÖ¸¶¨ÈÝÆ÷ÄÚµÄĿ¼ÓëËÞÖ÷»úÉϵÄĿ¼¶ÔÓ¦¡£
ÄÚ´æȱ·¦
ÔÚÆô¶¯GitLabÈÝÆ÷ʱ£¬ÈôÊÇËÞÖ÷»úÉϵÄÄÚ´æȱ·¦£¬ÈÝÆ÷Æô¶¯Ò²»áʧ°Ü¡£½â¾ö´ËÎÊÌâµÄÒªÁì¾ÍÊÇÔöÌíËÞÖ÷»úÄڴ棬»òÕßÖ¸¶¨ÈÝÆ÷ÄÚ´æÏÞÖÆ¡£ÀýÈ磺
docker run -d --memory=4g --memory-swap=4g -p 8080:80 -p 2222:22 -v /path/to/gitlab/config:/etc/gitlab -v /path/to/gitlab/logs:/var/log/gitlab -v /path/to/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce
µÇ¼ºó¸´ÖÆ
Êý¾Ý¿âÅþÁ¬Ê§°Ü
GitLabÈÝÆ÷ÐèÒªÅþÁ¬Êý¾Ý¿âÀ´´æ´¢Êý¾Ý£¬ÈôÊÇÅþÁ¬Ê§°Ü£¬ÈÝÆ÷Æô¶¯Ò²»áʧ°Ü¡£½â¾ö´ËÎÊÌâµÄÒªÁì¾ÍÊÇÈ·±£Êý¾Ý¿âЧÀÍÕý³£ÔËÐУ¬²¢ÔÚÆô¶¯ÈÝÆ÷ʱ£¬Ö¸¶¨×¼È·µÄÊý¾Ý¿âÅþÁ¬²ÎÊý¡£ÀýÈ磺
docker run -d -p 8080:80 -p 2222:22 -v /path/to/gitlab/config:/etc/gitlab -v /path/to/gitlab/logs:/var/log/gitlab -v /path/to/gitlab/data:/var/opt/gitlab -e GITLAB_OMNIBUS_CONFIG="external_url 'http://gitlab.example.com'; gitlab_rails['db_adapter'] = 'postgresql'; gitlab_rails['db_encoding'] = 'unicode'; gitlab_rails['db_database'] = 'gitlabhq_production'; gitlab_rails['db_pool'] = 10; gitlab_rails['db_username'] = 'gitlab'; gitlab_rails['db_password'] = 'password'; gitlab_rails['db_host'] = 'db.example.com'; gitlab_rails['db_port'] = 5432;" gitlab/gitlab-ce
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬-e²ÎÊýÖ¸¶¨ÁËGitLabµÄÉèÖòÎÊý£¬°üÀ¨Êý¾Ý¿âÅþÁ¬²ÎÊý¡£
ϵͳÇéÐÎÎÊÌâ
ÈôÊÇËÞÖ÷»úµÄϵͳÇéÐÎÓëÈÝÆ÷ÒªÇóµÄ·×ÆçÖ£¬ÈÝÆ÷Æô¶¯Ò²»áʧ°Ü¡£ÀýÈ磬ÔÚÆô¶¯ÈÝÆ÷ʱ£¬ÈôÊDZ¨´íÐÅÏ¢ÖÐÏÔʾ¡°No space left on device¡±£¬ÕâÊÇÓÉÓÚËÞÖ÷»úÉϵÄ/tmpĿ¼ûÓÐ×ã¹»µÄ¿Õ¼ä£¬ÐèÒªÕûÀíËü¡£½â¾ö´ËÎÊÌâµÄÒªÁì¾ÍÊÇÕûÀíËÞÖ÷»úÉϵÄ/tmpĿ¼£º
sudo rm -rf /tmp/*
µÇ¼ºó¸´ÖÆ
×ÛÉÏËùÊö£¬Æô¶¯GitLabÈÝÆ÷±¨´í¿ÉÄÜÊǶàÖÖÔµ¹ÊÔÓÉÔì³ÉµÄ¡£ÎÒÃÇÓ¦¸Ã×¢ÖØÊÓ²ì¹ýʧÐÅÏ¢£¬Æ¾Ö¤¹ýʧÐÅÏ¢ÕÒµ½½â¾öÒªÁ죬²Å»ªË³ËìÆô¶¯GitLabÈÝÆ÷¡£
ÒÔÉϾÍÊÇ¡¾×ܽ᡿GitLabÈÝÆ÷Æô¶¯±¨´íµÄÖÖÖÖÇéÐÎÏ¢Õù¾öÒªÁìµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡