mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-24 08:52:31 +02:00
update gitlab
This commit is contained in:
parent
44e2f60603
commit
eaa75b551f
@ -7,18 +7,17 @@ deployment tool.
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```
|
||||
```yaml
|
||||
gitlab:
|
||||
image: gitlab/gitlab-ce
|
||||
hostname: git.example.com
|
||||
environment:
|
||||
GITLAB_OMNIBUS_CONFIG: |
|
||||
external_url 'https://git.example.com'
|
||||
nginx['redirect_http_to_https'] = true
|
||||
gitlab_rails['gitlab_shell_ssh_port'] = 2222
|
||||
ports:
|
||||
- "22:22"
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "2222:22"
|
||||
volumes:
|
||||
- ./gitlab/config:/etc/gitlab
|
||||
- ./gitlab/logs:/var/log/gitlab
|
||||
@ -26,25 +25,40 @@ gitlab:
|
||||
restart: always
|
||||
```
|
||||
|
||||
> You can put TLS crt+key into `./gitlab/config/ssl/`.
|
||||
You can put TLS crt+key into `./gitlab/config/ssl/`:
|
||||
|
||||
## up and running
|
||||
- `git.example.com.crt`
|
||||
- `git.example.com.key`
|
||||
|
||||
```
|
||||
If you bind port 22, you need to change host `sshd` config:
|
||||
|
||||
```bash
|
||||
$ vi /etc/ssh/sshd_config
|
||||
- Port 22
|
||||
+ Port 2222
|
||||
|
||||
$ systemctl restart ssh
|
||||
|
||||
$ docker-compose up -d
|
||||
|
||||
$ firefox https://git.example.com
|
||||
$ ssh -p 2222 localhost
|
||||
```
|
||||
|
||||
## up and running
|
||||
|
||||
```bash
|
||||
$ mkdir -p ~/fig/gitlab/gitlab/config/ssh
|
||||
$ cd ~/fig/gitlab/gitlab/config/ssh
|
||||
$ openssl req -newkey rsa:4096 -nodes -sha256 -x509 -days 365 \
|
||||
-keyout git.example.com.key \
|
||||
-out git.example.com.crt
|
||||
$ docker-compose up -d
|
||||
```
|
||||
|
||||
Open <https://git.example.com> in your web browser:
|
||||
|
||||
- username: `root`
|
||||
- password: `5iveL!fe`
|
||||
|
||||
## backup volumes
|
||||
|
||||
```
|
||||
```bash
|
||||
$ docker run --rm \
|
||||
--volumes-from gitlab_gitlab_1 \
|
||||
-v $PWD:/tmp \
|
||||
@ -58,5 +72,6 @@ $ tar tzf gitlab.tgz
|
||||
|
||||
- http://docs.gitlab.com/omnibus/docker/
|
||||
- https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/nginx.md
|
||||
- https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/configuration.md
|
||||
|
||||
[1]: https://gitlab.com/
|
||||
|
@ -4,11 +4,10 @@ gitlab:
|
||||
environment:
|
||||
GITLAB_OMNIBUS_CONFIG: |
|
||||
external_url 'https://git.example.com'
|
||||
nginx['redirect_http_to_https'] = true
|
||||
gitlab_rails['gitlab_shell_ssh_port'] = 2222
|
||||
ports:
|
||||
- "22:22"
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "2222:22"
|
||||
volumes:
|
||||
- ./gitlab/config:/etc/gitlab
|
||||
- ./gitlab/logs:/var/log/gitlab
|
||||
|
Loading…
Reference in New Issue
Block a user