Skip to content

Instantly share code, notes, and snippets.

@mRoca
Last active August 29, 2015 14:21
Show Gist options
  • Save mRoca/f0eb12a75b19b1b88e78 to your computer and use it in GitHub Desktop.
Save mRoca/f0eb12a75b19b1b88e78 to your computer and use it in GitHub Desktop.
Gitlab docker

Gitlab image and doc : https://github.com/sameersbn/docker-gitlab

Install

Create containers

mkdir -p /srv/docker/images/gitlab/
cat docker-compose.yml > /srv/docker/images/gitlab/docker-compose.yml
# Edit the docker-compose.yml file

Run

cd /srv/docker/images/gitlab/
docker-compose up -d

Wait a few minutes, then go to http://localhost:10080/

Summary

  • Gitlab docker image folder : /srv/docker/images/gitlab
  • Gitlab data folder : /srv/docker/gitlab/gitlab
  • PostgreSQL data folder : /srv/docker/gitlab/postgresql
  • Redis data folder : /srv/docker/gitlab/redis
postgresql:
image: sameersbn/postgresql:9.4
environment:
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
volumes:
- /srv/docker/gitlab/postgresql:/var/lib/postgresql
gitlab:
image: sameersbn/gitlab:7.10.4
links:
- redis:redisio
- postgresql:postgresql
ports:
- "10080:80"
- "10022:22"
environment:
- TZ=Europe/Paris
- SMTP_ENABLED=false
- SMTP_DOMAIN=www.example.com
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=587
- [email protected]
- SMTP_PASS=password
- SMTP_STARTTLS=true
- SMTP_AUTHENTICATION=login
- GITLAB_TIMEZONE=Paris
- GITLAB_HOST=localhost
- GITLAB_PORT=10080
- GITLAB_SSH_PORT=10022
- [email protected]
- [email protected]
- GITLAB_BACKUPS=daily
- GITLAB_BACKUP_TIME=01:00
- LDAP_ENABLED=false
- LDAP_HOST=null
- LDAP_PORT=389
- LDAP_UID=sAMAccountName
- LDAP_METHOD=plain
- LDAP_BIND_DN=null
- LDAP_PASS=password
- LDAP_ACTIVE_DIRECTORY=false
- LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN=true
- LDAP_BLOCK_AUTO_CREATED_USERS=false
- LDAP_BASE=null
- LDAP_USER_FILTER=null
volumes:
- /srv/docker/gitlab/gitlab:/home/git/data
redis:
image: sameersbn/redis:latest
volumes:
- /srv/docker/gitlab/redis:/var/lib/redis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment