User:SBassett (WMF)/Explorations/Gitlab

Gitlab development environment setup
The following setup steps were tested under MacOS Mojave (10.14.6) on a 2.2 Ghz Intel i7 running 8 Gb RAM. docker run --detach \ --hostname gitlab.test.wmf \ --publish 80:80 \ --name gitlab \ --restart always \ --volume $GITLAB_HOME/config:/etc/gitlab \ --volume $GITLAB_HOME/logs:/var/log/gitlab \ --volume $GITLAB_HOME/data:/var/opt/gitlab \ gitlab/gitlab-ce:latest
 * Install Docker locally, if you haven't, probably via Docker Desktop.
 * Give Docker enough local resources. Via Docker Desktop, setting 3 cores, 5 Gb of RAM and 2 Gb of swap worked fine.
 * Add  (or similar - whatever hostname you want to use) to your   file.
 * Run  to refresh your DNS.
 * Set the following env variable:  (or whatever local dir you want to use for Gitlab)
 * Then run the following docker command:
 * This will pull the latest gitlab-ce docker image and run it. It might take a little while to download the relevant images, especially since   is almost a Gb by itself.  The above runs Gitlab on port 80 as opposed to also running https on port 443 and ssh on port 22, which likely won't be needed for the Security Team's local development needs.
 * Edit  and set external_url to whatever you set the development hostname to within you   file.
 * Run  to get a   prompt within the running container.
 * Run  within the aforementioned   prompt.  This might take several minutes.
 * Once the above  command completes, you should be able to see your Gitlab installation within a browser at http://gitlab.test.wmf/
 * To bring down the container, run

Gitlab doc

 * WG doc
 * Wikimedia Gitlab workflows
 * Gitlab CE docker hub page
 * Gitlab docker setup documentation
 * Python Gitlab package