Skip to content

Instantly share code, notes, and snippets.

@brccabral
Last active March 2, 2026 00:46
Show Gist options
  • Select an option

  • Save brccabral/d3d376991683a4e981a93131edc4b96f to your computer and use it in GitHub Desktop.

Select an option

Save brccabral/d3d376991683a4e981a93131edc4b96f to your computer and use it in GitHub Desktop.
Gitlab CE

Gitlab CE

networks:
  gitlab:
    driver: bridge

services:
  gitlab:
    container_name: gitlab
    image: gitlab/gitlab-ce:18.7.3-ce.0
    platform: linux/arm64
    hostname: gitlab.myexample.mydomain
    shm_size: 256m
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'https://gitlab.myexample.mydomain'
        gitlab_rails['lfs_enabled'] = true
        gitlab_rails['gitlab_shell_ssh_port'] = 30022
      #nginx['listen_https'] = false # to use port 80
    networks:
      - gitlab
    ports:
      - 127.0.0.1:30443:443
      - 192.169.x.x:30022:22
      #- 127.0.0.1:30080:80
    restart: unless-stopped
    volumes:
      - /home/username/somepath/config:/etc/gitlab
      - /home/username/somepath/logs:/var/log/gitlab
      - /home/username/somepath/data:/var/opt/gitlab

The inital web root password is at /etc/gitlab/initial_root_password.

GITLAB_OMNIBUS_CONFIG should be set in /etc/gitlab/gitlab.rb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment