Reputation: 2375
I am building an automatic deployment platform containing a Gitlab instance. This Gitlab instance is inside a docker and it is deployed through Ansible.
I would like to customize Gitlab settings before deploying it but after some readings of the documentation, I cannot find how to disable sign up without using the Administration HMI.
Some people says "Modify /etc/gitlab/gitlab.rb to add a parameter to disable signup" : I don't have this file on my filesystem & it doesn't work on my machine.
I also tried to modify the file gitlab.yml, and my setting is removed after I restart my docker. And it doesn't work.
I could use the API, but I need the admin token, only accessible through its HMI (sic).
I could alter the database of my gitlab instance... But what a complex operation for this simple setting.
Any suggestion ?
Upvotes: 2
Views: 905
Reputation: 3780
This docker container is being configured via enviroment variables. What you need to do is to set this variable or create a env-file with your parameters (recommended).
The parameter you are looking for is GITLAB_SIGNUP_ENABLED=false
You do this either with docker run <other parameter> -e GITLAB_SIGNUP_ENABLED=false
or with --env-file <path-to-enviroment-vars>
.
All configuration switches are here.
Upvotes: 1