This is a simple GitLab environment built with docker-compose.
- docker-compose 1.6.0+
- docker 1.10.0+
The make utility is used in this documentation.
Install it or use commands from the ./Makefile.
Follow the steps below to start:
make config
- create .env file from the example- Setup environments in .env file
make up
- up the containers
GitLab will run installation scripts in a silent mode,
the address you have configured will redirect you to a login page after all done.
You can watch the progress (online logs) with make watch
command.
make runner
- register a new runner.
Runners config will be ./volume/runner/config.toml
.
config
- create .env file from .env-exampleup
- up the containersdown
- down the containersrestart
- restart the containersshell
- connect to the gitlab containerrails-console
- connect to the gitlab-rails consolewatch
- watch the gitlab container logsrunner
- register a new gitlab runner
The user "root" is created automatically only if you send a correct GITLAB_ROOT_PASSWORD environment on the first gitlab container start.
If you doesn't, you have to remove all volume data manually and then up the container again.
You can check the root user exists by rails console:
make rails-console
User.where(username: "root").first
- get the root user object
If you register a runner and this runner jobs failed with fatal error "Could not resolve host", add current gitlab network from docker-compose to the runner in ./volume/runner/config.toml
like this
# ...
[[runners]]
# ...
[runners.docker]
# ...
network_mode = "local-gitlab_gitlab"
You can check docker networks with command docker network ls