Skip to content

Commit 7dd95cd

Browse files
add named volumes + add ssh port variables
1 parent a01721e commit 7dd95cd

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

.env renamed to .env.dist

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
GITLAB_HOSTNAME=my.domain.tld
2+
GITLAB_SSH_PORT=22

.gitignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
config/
2-
data/
3-
logs/
1+
.env

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ git clone https://github.com/solution-libre/docker-gitlab.git gitlab
2121
cd gitlab
2222
```
2323

24-
Change the hostname value in `.env`.
24+
Declare environment variables or copy the `.env.dist` to `.env` and adjust its values.
2525

2626
## Usage
2727

@@ -38,6 +38,10 @@ docker-compose up -d
3838

3939
The GitLab hostname. Default value: 'my.domain.tld'
4040

41+
#### `GITLAB_SSH_PORT`
42+
43+
The GitLab SSH port for git. Default value: '22'
44+
4145
## Development
4246

4347
[Solution Libre](https://www.solution-libre.fr)'s repositories are open projects, and community contributions are essential for keeping them great.

docker-compose.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,25 @@ services:
1818
- default
1919
- web
2020
ports:
21-
- '22:22'
21+
- ${GITLAB_SSH_PORT}:22
2222
volumes:
23-
- ./docker-volume/web/config:/etc/gitlab
24-
- ./docker-volume/web/logs:/var/log/gitlab
25-
- ./docker-volume/web/data:/var/opt/gitlab
23+
- web_config:/etc/gitlab
24+
- web_logs:/var/log/gitlab
25+
- web_data:/var/opt/gitlab
2626

2727
runner:
2828
image: 'gitlab/gitlab-runner:latest'
2929
restart: always
3030
volumes:
31-
- ./docker-volume/runner/config:/etc/gitlab-runner
31+
- runner_config:/etc/gitlab-runner
3232
- /var/run/docker.sock:/var/run/docker.sock
3333

3434
networks:
3535
web:
3636
external: true
37+
38+
volumes:
39+
runner_config:
40+
web_config:
41+
web_data:
42+
web_logs:

0 commit comments

Comments
 (0)