Skip to content

Instantly share code, notes, and snippets.

@mahdizojaji
Last active August 23, 2024 10:17
Show Gist options
  • Save mahdizojaji/6dd7ce8fedf645ff2b616444a58676ff to your computer and use it in GitHub Desktop.
Save mahdizojaji/6dd7ce8fedf645ff2b616444a58676ff to your computer and use it in GitHub Desktop.
Gitlab CE self hosted

Gitlab CE self hosted

version: "3"
services:
gitlab:
image: 'gitlab/gitlab-ce:latest'
restart: always
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://example.com'
registry_external_url 'https://reg.example.com'
mattermost_external_url 'https://mattermost.example.com'
nginx['redirect_http_to_https'] = true
nginx['redirect_http_to_https_port'] = 80
registry_nginx['redirect_http_to_https'] = true
mattermost_nginx['redirect_http_to_https'] = true
# Add any other gitlab.rb configuration here, each on its own line
hostname: 'example.com'
ports:
- '80:80'
- '443:443'
- '22:22'
volumes:
- '/srv/gitlab/config:/etc/gitlab:Z'
- '/srv/gitlab/logs:/var/log/gitlab:Z'
- '/srv/gitlab/data:/var/opt/gitlab:Z'
version: "3"
services:
gitlab:
image: 'gitlab/gitlab-ce:latest'
restart: always
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://example.com'
registry_external_url 'https://reg.example.com'
mattermost_external_url 'https://mattermost.example.com'
# Add any other gitlab.rb configuration here, each on its own line
hostname: 'example.com'
ports:
- '80:80'
- '443:443'
- '22:22'
volumes:
- '/srv/gitlab/config:/etc/gitlab:Z'
- '/srv/gitlab/logs:/var/log/gitlab:Z'
- '/srv/gitlab/data:/var/opt/gitlab:Z'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment