Let's document the easy installation of Omnibus Docker with Docker Compose
I came up with easy docker-compose.yml
that can be used to easily configure, install, and upgrade Docker-base GitLab installation. I think that we should document this:
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
# Add any other gitlab.rb configurations
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'
Use:
- Install Docker Compose.
- Create
docker-compose.yml
with above content in directory. - Use
docker-compose up -d
to start GitLab - Use
docker-compose pull
anddocker-compose up -d
to download a new release and upgrade GitLab instance.
This still requires putting the SSL certificates in /srv/gitlab/config
.
Example with GitLab running on a custom port:
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com:9090'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
ports:
- '9090:9090'
- '2224:22'
volumes:
- '/srv/gitlab/config:/etc/gitlab'
- '/srv/gitlab/logs:/var/log/gitlab'
- '/srv/gitlab/data:/var/opt/gitlab'
@axil What do you think?