Skip to content

Instantly share code, notes, and snippets.

@jens-a-e
Last active February 1, 2017 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jens-a-e/07aff85188512a6b3956b2252fe24702 to your computer and use it in GitHub Desktop.
Save jens-a-e/07aff85188512a6b3956b2252fe24702 to your computer and use it in GitHub Desktop.
Run Gitlab with Docker Compose

Running Gitlab using Docker Compose

This example also works on a current Synology. For a basic instance without email do the following:

(Assuming your main HD is on /volume1)

SSH onto your Syn: ssh admin@<your-syno.local>

mkdir -p /volum1/docker/gitlab
cd /volum1/docker/gitlab
mkdir config data logs

Then copy the docker-compose.yml to this directory via the file transfer of your choice.

Start as usual (it will restart automatically after reboot):

sudo docker-compose up -d

Wait! Gitlab takes a long timew to boot - especially the first time. Done!

Update

To update, ssh back on and cd into the same directory. Then run the following three commands:

sudo docker-compose down
sudo docker-compose pull
sudo docker-compose up -d
version: "2"
services:
omni:
image: 'gitlab/gitlab-ce:latest'
restart: always
container_name: 'gitlab'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url "http://yourhost.local:8888"
gitlab_rails["gitlab_shell_ssh_port"] = 2224
gitlab_rails["lfs_enabled"] = true
gitlab_rails["time_zone"] = "CET"
gitlab_rails["gitlab_email_enabled"] = false
ports:
- '0.0.0.0:8888:8888'
- '0.0.0.0:2224:22'
volumes:
- './config:/etc/gitlab'
- './logs:/var/log/gitlab'
- './data:/var/opt/gitlab'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment