Skip to content

Commit

Permalink
Upgrade to the latest GitLab Omnibus Docker (#1235)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew McMillan <[email protected]>
  • Loading branch information
UnsolvedCypher and Matthew McMillan authored Feb 2, 2022
1 parent 92dfac9 commit dac0c6e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 86 deletions.
6 changes: 3 additions & 3 deletions src/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ To start the containers, run `docker-compose up -d` from the `docker` folder. If

## Access GitLab

To access `GitLab`, point your browser to `http://localhost:10080` and set a password for the `root` user account. Then create a user for Jenkins, impersonate that user, get its API key, set up test repos, etc. When creating webhooks to trigger Jenkins jobs, use `http://jenkins:8080` as the base URL.
To access `GitLab`, point your browser to `http://localhost:10080` and log in with `root` as the username and `password` as the password. Then create a user for Jenkins, impersonate that user, get its API key, set up test repos, etc. When creating webhooks to trigger Jenkins jobs, use `http://jenkins:8080` as the base URL.

For more information on the supported `GitLab` versions and how to configure the containers, visit Sameer Naik's github page at https://github.com/sameersbn/docker-gitlab.
If you have trouble cloning a GitLab repository, it may be because you have a leftover host key from an SSH connection to a previous installation of GitLab in Docker. To troubleshoot, run `ssh -vT git@localhost -p 10022`.

## Access Jenkins

To see `Jenkins`, point your browser to `http://localhost:8080`. Jenkins will be able to access GitLab at `http://gitlab`
To see `Jenkins`, point your browser to `http://localhost:8080`. Jenkins will be able to access GitLab at `http://gitlab`.
Note: you need to change the security settings in `Admin -> Settings -> Network -> Outbound Requests -> Allow requests to the local network from hooks and services` in order for local webhooks to work.

For more information on the supported `Jenkins` tags and how to configure the containers, visit https://hub.docker.com/r/jenkins/jenkins/.
Expand Down
96 changes: 13 additions & 83 deletions src/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,92 +1,22 @@
version: '2'
version: '3'

services:
postgresql:
restart: "no"
image: sameersbn/postgresql:9.6-2
ports:
- "5432:5432"
environment:
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
- DB_EXTENSION=pg_trgm
volumes:
- /srv/docker/gitlab/postgresql:/var/lib/postgresql

gitlab:
image: 'gitlab/gitlab-ce:14.7.0-ce.0'
restart: "no"
image: sameersbn/gitlab:11.0.3
depends_on:
- redis
- postgresql
hostname: 'localhost'
ports:
- "10080:80"
- "10022:22"
environment:
- DEBUG=false

- DB_ADAPTER=postgresql
- DB_HOST=postgresql
- DB_PORT=5432
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production

- REDIS_HOST=redis
- REDIS_PORT=6379

- TZ=Asia/Kolkata
- GITLAB_TIMEZONE=Kolkata

- GITLAB_HTTPS=false
- SSL_SELF_SIGNED=false

- GITLAB_HOST=localhost
- GITLAB_PORT=10080
- GITLAB_SSH_PORT=10022
- GITLAB_RELATIVE_URL_ROOT=
- GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string
- GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alphanumeric-string
- GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string

- GITLAB_ROOT_PASSWORD=
- GITLAB_ROOT_EMAIL=

- GITLAB_NOTIFY_ON_BROKEN_BUILDS=true
- GITLAB_NOTIFY_PUSHER=false

- [email protected]
- [email protected]
- [email protected]

- GITLAB_BACKUP_SCHEDULE=daily
- GITLAB_BACKUP_TIME=01:00

- 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

- IMAP_ENABLED=false
- IMAP_HOST=imap.gmail.com
- IMAP_PORT=993
- [email protected]
- IMAP_PASS=password
- IMAP_SSL=true
- IMAP_STARTTLS=false
- '10080:80'
- '10022:22'
volumes:
- /srv/docker/gitlab/gitlab:/home/git/data

redis:
restart: "no"
image: sameersbn/redis:latest
volumes:
- /srv/docker/gitlab/redis:/var/lib/redis
- '/srv/docker/gitlab/config:/etc/gitlab'
- '/srv/docker/gitlab/logs:/var/log/gitlab'
- '/srv/docker/gitlab/data:/var/opt/gitlab'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://localhost'
gitlab_rails['gitlab_shell_ssh_port'] = 10022
gitlab_rails['initial_root_password'] = 'password'
jenkins:
restart: "no"
Expand Down

0 comments on commit dac0c6e

Please sign in to comment.