loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Docs about how to generate config for act runner with docker and setup it with docker-compose (#25256)

In this pull request, the following changes are addressed:

- State user should create `config.yaml` before start container to avoid
errors.
- Provided instructions to deploy runners using docker compose.

authored by

Zisu Zhang and committed by
GitHub
e00f3c77 6db66d8c

+54
+27
docs/content/doc/usage/actions/act-runner.en-us.md
··· 76 76 ./act_runner --config config.yaml [command] 77 77 ``` 78 78 79 + You could also generate config file with docker: 80 + 81 + ```bash 82 + docker run --entrypoint="" --rm -it gitea/act_runner:latest act_runner generate-config > config.yaml 83 + ``` 84 + 79 85 When you are using the docker image, you can specify the configuration file by using the `CONFIG_FILE` environment variable. Make sure that the file is mounted into the container as a volume: 80 86 81 87 ```bash ··· 171 177 It is because the act runner will run jobs in docker containers, so it needs to communicate with the docker daemon. 172 178 As mentioned, you can remove it if you want to run jobs in the host directly. 173 179 To be clear, the "host" actually means the container which is running the act runner now, instead of the host machine. 180 + 181 + ### Set up the runner using docker compose 182 + 183 + You could also set up the runner using the following `docker-compose.yml`: 184 + 185 + ```yml 186 + version: "3.8" 187 + services: 188 + runner: 189 + image: gitea/act_runner:nightly 190 + environment: 191 + CONFIG_FILE: /config.yaml 192 + GITEA_INSTANCE_URL: "${INSTANCE_URL}" 193 + GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}" 194 + GITEA_RUNNER_NAME: "${RUNNER_NAME}" 195 + GITEA_RUNNER_LABELS: "${RUNNER_LABELS}" 196 + volumes: 197 + - ./config.yaml:/config.yaml 198 + - ./data:/data 199 + - /var/run/docker.sock:/var/run/docker.sock 200 + ``` 174 201 175 202 ### Configuring cache when starting a Runner using docker image 176 203
+27
docs/content/doc/usage/actions/act-runner.zh-cn.md
··· 76 76 ./act_runner --config config.yaml [command] 77 77 ``` 78 78 79 + 您亦可以如下使用 docker 创建配置文件: 80 + 81 + ```bash 82 + docker run --entrypoint="" --rm -it gitea/act_runner:latest act_runner generate-config > config.yaml 83 + ``` 84 + 79 85 当使用Docker镜像时,可以使用`CONFIG_FILE`环境变量指定配置文件。确保将文件作为卷挂载到容器中: 80 86 81 87 ```bash ··· 168 174 这是因为Act Runner将在Docker容器中运行Job,因此它需要与Docker守护进程进行通信。 169 175 如前所述,如果要在主机上直接运行Job,可以将其移除。 170 176 需要明确的是,这里的 "主机" 实际上指的是当前运行 Act Runner的容器,而不是主机机器本身。 177 + 178 + ### 使用 Docker compose 运行 Runner 179 + 180 + 您亦可使用如下的 `docker-compose.yml`: 181 + 182 + ```yml 183 + version: "3.8" 184 + services: 185 + runner: 186 + image: gitea/act_runner:nightly 187 + environment: 188 + CONFIG_FILE: /config.yaml 189 + GITEA_INSTANCE_URL: "${INSTANCE_URL}" 190 + GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}" 191 + GITEA_RUNNER_NAME: "${RUNNER_NAME}" 192 + GITEA_RUNNER_LABELS: "${RUNNER_LABELS}" 193 + volumes: 194 + - ./config.yaml:/config.yaml 195 + - ./data:/data 196 + - /var/run/docker.sock:/var/run/docker.sock 197 + ``` 171 198 172 199 ### 当您使用 Docker 镜像启动 Runner,如何配置 Cache 173 200