Skip to content

Instantly share code, notes, and snippets.

@kiyui
Created March 20, 2017 05:46
Show Gist options
  • Save kiyui/9401374029c2dac3f8f2dcd7b1669822 to your computer and use it in GitHub Desktop.
Save kiyui/9401374029c2dac3f8f2dcd7b1669822 to your computer and use it in GitHub Desktop.
Gitlab & Gitlab CI Docker Compose
version: "2"
services:
gitlab:
image: gitlab/gitlab-ce
network_mode: "bridge"
restart: always
volumes:
- './gitlab/config:/etc/gitlab'
- './gitlab/logs:/var/log/gitlab'
- './gitlab/data:/var/opt/gitlab'
ports:
- "80:80"
- "443:443"
- "22:22"
expose:
- "80"
- "443"
- "22"
extra_hosts:
- "gitlab:127.0.0.1"
hostname: "gitlab"
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab'
runner:
image: gitlab/gitlab-runner
network_mode: "bridge"
restart: always
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./gitlab-runner/config:/etc/gitlab-runner"
links:
- "gitlab:gitlab"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment