Difference between revisions of "GitLab docker compose example"

From wikieduonline
Jump to navigation Jump to search
(Created page with "<pre> web: image: 'gitlab/gitlab-ce:latest' restart: always hostname: 'gitlab.example.com' environment: GITLAB_OMNIBUS_CONFIG: | external_url 'https://gitlab...")
Tags: Mobile web edit, Mobile edit
 
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<pre>
+
https://docs.gitlab.com/omnibus/docker/
web:
+
 
  image: 'gitlab/gitlab-ce:latest'
+
version: '3.6'
  restart: always
+
services:
  hostname: 'gitlab.example.com'
+
  web:
  environment:
+
    image: 'gitlab/gitlab-ee:latest'
    GITLAB_OMNIBUS_CONFIG: |
+
    restart: always
      external_url 'https://gitlab.example.com'
+
    hostname: 'gitlab.example.com'
  ports:
+
    [[environment:]]
    - '80:80'
+
      GITLAB_OMNIBUS_CONFIG: |
    - '443:443'
+
        external_url 'https://gitlab.example.com'
    - '22:22'
+
        # Add any other gitlab.rb configuration here, each on its own line
  volumes:
+
    ports:
    - '/srv/gitlab/config:/etc/gitlab'
+
      - '80:80'
    - '/srv/gitlab/logs:/var/log/gitlab'
+
      - '443:443'
    - '/srv/gitlab/data:/var/opt/gitlab'
+
      - '22:22'
</pre>
+
    [[volumes:]]
 +
      - '$GITLAB_HOME/config:/etc/gitlab'
 +
      - '$GITLAB_HOME/logs:/var/log/gitlab'
 +
      - '$GITLAB_HOME/data:/var/opt/gitlab'
 +
    shm_size: '256m'
 +
 
 +
 
 +
 
 +
web:
 +
  image: 'gitlab/[[gitlab-ce]]:latest'
 +
  restart: always
 +
  hostname: 'gitlab.example.com'
 +
  environment:
 +
    GITLAB_OMNIBUS_CONFIG: |
 +
      external_url 'https://gitlab.example.com'
 +
  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'
 +
 
 +
[[GitLab: docker-compose up -d]]
 +
 
 +
 
 +
== Related terms ==
 +
* <code>image: 'gitlab/[[gitlab-ee]]:latest'</code>
  
  
Line 21: Line 49:
 
* {{GitLab}}
 
* {{GitLab}}
 
* {{docker-compose}}
 
* {{docker-compose}}
 +
 +
[[Category:Docker]]
 +
[[Category:GitLab]]

Latest revision as of 12:12, 25 October 2023

https://docs.gitlab.com/omnibus/docker/

version: '3.6'
services:
 web:
   image: 'gitlab/gitlab-ee:latest'
   restart: always
   hostname: 'gitlab.example.com'
   environment:
     GITLAB_OMNIBUS_CONFIG: |
       external_url 'https://gitlab.example.com'
       # Add any other gitlab.rb configuration here, each on its own line
   ports:
     - '80:80'
     - '443:443'
     - '22:22'
   volumes:
     - '$GITLAB_HOME/config:/etc/gitlab'
     - '$GITLAB_HOME/logs:/var/log/gitlab'
     - '$GITLAB_HOME/data:/var/opt/gitlab'
   shm_size: '256m'


web:
  image: 'gitlab/gitlab-ce:latest'
  restart: always
  hostname: 'gitlab.example.com'
  environment:
    GITLAB_OMNIBUS_CONFIG: |
      external_url 'https://gitlab.example.com'
  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'
GitLab: docker-compose up -d


Related terms[edit]


See also[edit]

Advertising: