-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose-deploy.yml
39 lines (36 loc) · 1.35 KB
/
compose-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Deployment Setup:
#
# Make sure the environment variable `TOKEN_SECRET` is injected from your secrets in CI. Then,
# running `docker compose -f compose-deploy.yml up -d` will deploy the latest runrs alongside
# `gitlab-runner`. If you do so on a host where port 3000 is mapped through to be externally
# accessible, you can then use the `peripheral` Terraform Provider[0] to create runners.
#
# If you set the environment variables `DOCKER_HOST` to an external Docker host (which should look
# like `export DOCKER_HOST="ssh://user@external-docker-host"`, where `user` is in the `docker` group
# or able to access Docker for another reason) before running the up command, you can deploy to that
# remote Docker host.
#
# [0]: https://registry.terraform.io/providers/bmc-labs/peripheral/latest/docs
volumes:
data:
services:
gitlab-runner:
image: gitlab/gitlab-runner:latest
restart: always
volumes:
- data:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock
runrs:
image: ghcr.io/bmc-labs/runrs:latest
pull_policy: always
restart: always
environment:
RUST_LOG: "error,runrs=warn"
LOG_FMT: "plain"
DATABASE_URL: "/etc/gitlab-runner/runrs.sqlite"
CONFIG_PATH: "/etc/gitlab-runner/config.toml"
SECRET: "${TOKEN_SECRET}"
ports:
- 80:3000
volumes:
- data:/etc/gitlab-runner