This commit is contained in:
Mike McFetridge
2026-07-20 09:23:17 -04:00
parent c1315882da
commit 72272e4006
3179 changed files with 562960 additions and 14 deletions
+8
View File
@@ -0,0 +1,8 @@
services:
<< service_name >>:
image: docker.io/gitlab/gitlab-runner:alpine-v17.9.1
container_name: << container_name >>
volumes:
- ./config/config.toml:/etc/gitlab-runner/config.toml:ro
- /var/run/docker.sock:/var/run/docker.sock
restart: << restart_policy >>
@@ -0,0 +1,25 @@
concurrent = << gitlab_runner_concurrent >>
log_level = "warning"
log_format = "json"
check_interval = 5
[[runners]]
name = "<< gitlab_runner_name >>"
url = "<< gitlab_url >>"
executor = "docker"
token = "<< gitlab_runner_token >>"
limit = 0
# FIXME To increase rate limits, when pulling down images from the Docker Hub you might want to authenticate:
# 1. Create a Docker Hub account and generate a personal access token
# 2. Encode the username and token in base64
# Example: echo -n 'username:token' | base64
# 3. Replace the <BASE64_ENCODED_AUTH> with the base64 encoded string
environment = ["DOCKER_AUTH_CONFIG={\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"<BASE64_ENCODED_AUTH>\"}}}"]
[runners.docker]
tls_verify = false
image = "<< gitlab_executor_image >>"
privileged = true
disable_cache = false
volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"]
[runners.cache]
Insecure = false
+112
View File
@@ -0,0 +1,112 @@
{
"slug": "gitlab-runner",
"kind": "compose",
"metadata": {
"name": "Gitlab-Runner",
"description": "CI/CD build runner for GitLab pipelines. Executes jobs defined in .gitlab-ci.yml using the Docker executor.",
"tags": [],
"icon": {
"provider": "simple-icons",
"id": "gitlab"
},
"draft": false,
"version": {
"name": "alpine-v17.9.1",
"source_dep_name": "docker.io/gitlab/gitlab-runner",
"source_dep_version": "alpine-v17.9.1"
}
},
"variables": [
{
"title": "General",
"name": "general",
"items": [
{
"name": "service_name",
"type": "str",
"title": "Service Name",
"required": false,
"default": "gitlab-runner",
"config": {
"placeholder": "gitlab-runner"
}
},
{
"name": "container_name",
"type": "str",
"title": "Container Name",
"required": false,
"default": "gitlab-runner",
"config": {
"placeholder": "gitlab-runner"
}
},
{
"name": "restart_policy",
"type": "enum",
"title": "Restart Policy",
"required": true,
"default": "unless-stopped",
"config": {
"options": [
"unless-stopped",
"always",
"on-failure",
"no"
]
}
},
{
"name": "gitlab_url",
"type": "str",
"title": "GitLab URL",
"required": true,
"config": {
"placeholder": "https://gitlab.example.com/"
},
"description": "Base URL of the GitLab instance."
},
{
"name": "gitlab_runner_name",
"type": "str",
"title": "Runner Name",
"required": false,
"default": "gitlab-runner",
"config": {
"placeholder": "gitlab-runner"
},
"description": "Runner name shown in GitLab."
},
{
"name": "gitlab_runner_token",
"type": "secret",
"title": "Runner Authentication Token",
"required": true,
"description": "Runner authentication token created in GitLab."
},
{
"name": "gitlab_runner_concurrent",
"type": "int",
"title": "Concurrent Jobs",
"required": false,
"default": 4,
"description": "Maximum number of jobs the runner can process at the same time.",
"config": {
"placeholder": "4"
}
},
{
"name": "gitlab_executor_image",
"type": "str",
"title": "Default Executor Image",
"required": false,
"default": "alpine:latest",
"config": {
"placeholder": "alpine:latest"
},
"description": "Default Docker image used for jobs that do not specify one."
}
]
}
]
}