You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+39-1
Original file line number
Diff line number
Diff line change
@@ -803,7 +803,8 @@ These options should contain something like:
803
803
804
804
### Available Configuration Parameters
805
805
806
-
*Please refer the docker run command options for the `--env-file` flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command. Alternatively you can use docker-compose.*
806
+
*Please refer the docker run command options for the `--env-file` flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command. Alternatively you can use docker-compose. docker-compose users and Docker Swarm mode users can also use the [secrets and config file options](#docker-secrets-and-configs)*
807
+
807
808
808
809
Below is the complete list of available options that can be used to customize your gitlab installation.
809
810
@@ -1044,6 +1045,43 @@ Below is the complete list of available options that can be used to customize yo
1044
1045
|`RACK_ATTACK_BANTIME`| Number of seconds an IP should be banned after too many auth attempts. Defaults to `3600`. |
1045
1046
|`GITLAB_WORKHORSE_TIMEOUT`| Timeout for gitlab workhorse http proxy. Defaults to `5m0s`. |
1046
1047
1048
+
### Docker secrets and configs
1049
+
1050
+
All the above environment variables can be put into a [secrets](https://docs.docker.com/compose/compose-file/#secrets) or [config](https://docs.docker.com/compose/compose-file/#configs) file
1051
+
and then both docker-compose and Docker Swarm can import them into your gitlab container.
1052
+
1053
+
On startup, the gitlab container will source env vars from a config file named `gitlab-config`, and then a secrets file named `gitlab-secrets` (both mounted in the default locations).
1054
+
1055
+
To modify your existing `docker-compose.yml` file, add the following to your gitlab service:
1056
+
1057
+
> Note: you also need to change the docker-compose file version `version: "3.4"`.
1058
+
1059
+
```
1060
+
services:
1061
+
gitlab:
1062
+
1063
+
...
1064
+
1065
+
configs:
1066
+
- gitlab-configs
1067
+
secrets:
1068
+
- gitlab-secrets
1069
+
```
1070
+
1071
+
And then define those secrets and configs:
1072
+
1073
+
```
1074
+
configs:
1075
+
gitlab-configs:
1076
+
file: ./gitlab.configs
1077
+
1078
+
secrets:
1079
+
gitlab-secrets:
1080
+
file: ./gitlab.secrets
1081
+
```
1082
+
1083
+
If you're not using one of these files, then don't include its entry in the docker-compose file.
0 commit comments