1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-25 00:08:49 +00:00
dockerfiles/gitlab/README.md

63 lines
1.2 KiB
Markdown
Raw Normal View History

2016-04-22 10:22:10 +00:00
gitlab
======
2016-06-09 15:41:17 +00:00
[GitLab][1] includes Git repository management, code reviews, issue tracking,
wikis, and more, plus GitLab CI, an easy-to-use continuous integration and
deployment tool.
2016-04-22 10:22:10 +00:00
## docker-compose.yml
```
gitlab:
image: gitlab/gitlab-ce
2016-06-10 04:35:11 +00:00
hostname: git.example.com
2016-06-09 15:41:17 +00:00
environment:
GITLAB_OMNIBUS_CONFIG: |
2016-06-10 04:35:11 +00:00
external_url 'https://git.example.com'
nginx['redirect_http_to_https'] = true
2016-04-22 10:22:10 +00:00
ports:
- "22:22"
- "80:80"
- "443:443"
2016-06-09 15:41:17 +00:00
volumes:
- ./gitlab/config:/etc/gitlab
- ./gitlab/logs:/var/log/gitlab
- ./gitlab/data:/var/opt/gitlab
2016-04-22 10:22:10 +00:00
restart: always
```
2016-06-10 04:35:11 +00:00
> You can put TLS crt+key into `./gitlab/config/ssl/`.
2016-04-22 10:22:10 +00:00
## up and running
```
$ vi /etc/ssh/sshd_config
- Port 22
+ Port 2222
2016-06-09 15:41:17 +00:00
2016-04-22 10:22:10 +00:00
$ systemctl restart ssh
$ docker-compose up -d
2016-06-10 04:35:11 +00:00
$ firefox https://git.example.com
2016-04-22 10:22:10 +00:00
```
## backup volumes
```
$ docker run --rm \
--volumes-from gitlab_gitlab_1 \
-v $PWD:/tmp \
alpine \
tar czf /tmp/gitlab.tgz /etc/gitlab /var/opt/gitlab /var/log/gitlab
$ tar tzf gitlab.tgz
```
2016-06-09 15:41:17 +00:00
## read more
- http://docs.gitlab.com/omnibus/docker/
2016-06-10 04:35:11 +00:00
- https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/nginx.md
2016-06-09 15:41:17 +00:00
[1]: https://gitlab.com/