services:gitlab:image:gitlab/gitlab-ee:18.9.7-ee.0container_name:gitlabrestart:alwayshostname:'https://gitlab.example.com'environment:GITLAB_OMNIBUS_CONFIG:| # Add any other gitlab.rb configuration here, each on its own line
external_url 'https://gitlab.example.com'ports:- '80:80'- '443:443'- '22:22'volumes:- 'cf24c157d0cac6f68e7a4b13920760fe953b4e0f17723625eb76f83a3ca10e1d:/etc/gitlab'- '8a130bf14966991beddf5716e605f2832c32ed543fb7a7310f0252b5bc495b36:/var/log/gitlab'- '7a77a9481799976e97d4ad246fa70c19705f1fa5e864e4e29436abd8f3440702:/var/opt/gitlab'
在日常使用的时候,我们第一次部署可能会遇到,也有可能一开始使用了 docker run 进行容器使用,然后发现需要进行修改,进行卷迁移的情况
services:gitlab:image:gitlab/gitlab-ee:18.9.7-ee.0container_name:gitlabrestart:alwayshostname:'https://gitlab.example.com'environment:GITLAB_OMNIBUS_CONFIG:| # Add any other gitlab.rb configuration here, each on its own line
external_url 'https://gitlab.example.com'ports:- '80:80'- '443:443'- '22:22'volumes:- './gitlabs/config:/etc/gitlab'- './gitlabs/logs:/var/log/gitlab'- './gitlabs/data:/var/opt/gitlab'