Skip to content

Instantly share code, notes, and snippets.

@ilkka
Created April 1, 2015 10:54
Show Gist options
  • Save ilkka/cac1e2189f59dc763187 to your computer and use it in GitHub Desktop.
Save ilkka/cac1e2189f59dc763187 to your computer and use it in GitHub Desktop.
GitLab + Jenkins in one command

GitLab + Jenkins in one command

$ docker-compose up

Here's a Docker Compose config file that'll give you Gitlab (SSH on 10022, HTTP on 10080) and Jenkins (HTTP on 10081) running and connected. Just add the GitLab CI and Git plugins to Jenkins and you're good to go.

Note that when setting Jenkins as your GitLab CI on the GitLab side, you have to use the container's IP since the link only goes the other way. Also GitLab can't send emails as is, I'm working on that.

---
postgresql:
image: sameersbn/postgresql:9.4
environment:
- DB_NAME=gitlabhq_production
- DB_USER=gitlab
- DB_PASS=password
volumes:
- ./dbdata:/var/lib/postgresql
redis:
image: sameersbn/redis:latest
gitlab:
image: sameersbn/gitlab:7.9.1
environment:
- GITLAB_PORT=10080
- GITLAB_SSH_PORT=10022
volumes:
- ./gitlab-data:/home/git/data
ports:
- "10022:22"
- "10080:80"
links:
- postgresql:postgresql
- redis:redisio
jenkins:
image: jenkins
ports:
- "10081:8080"
- "50000:50000"
links:
- gitlab:gitlab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment