forgejo/docs
32
45
Fork
You've already forked docs
204

Update actions: admin with a simplified docker-compose setup #1385

Open
CSDUMMI wants to merge 2 commits from CSDUMMI/docs:next into next
pull from: CSDUMMI/docs:next
merge into: forgejo:next
forgejo:next
forgejo:v14.0
forgejo:cli
forgejo:v13.0
forgejo:v11.0
forgejo:v12.0
forgejo:bp-v12.0-a6c8557
forgejo:v7.0
forgejo:v10.0
forgejo:v9.0
forgejo:v8.0
forgejo:v1.21
forgejo:v1.20
forgejo:v1.19
First-time contributor
Copy link

Using docker compose run commands to register a runner makes changing the docker-compose.yml before and after registration unnecessary.

Issue #1377 - Installation of forgejo-runner via docker - which docs should one use?

Using `docker compose run` commands to register a runner makes changing the docker-compose.yml before and after registration unnecessary. Issue #1377 - Installation of forgejo-runner via docker - which docs should one use?
Update docs: actions: admin with a simplified docker-compose setup
Some checks failed
pr / preview (pull_request_target) Failing after 24s
cdf3baea98
Using `docker compose run` commands to register a runner makes changing the docker-compose.yml before and after registration unnecessary.
Issue #1377 - Installation of forgejo-runner via docker - which docs should one use?
@ -401,3 +390,1 @@
chmod 775 data/.cache
chmod g+s data/.runner
chmod g+s data/.cache
mkdir data
Contributor
Copy link
# mkdir data
# chown -R 1001:1001 data/
```sh # mkdir data # chown -R 1001:1001 data/ ```
@ -404,3 +392,3 @@
```
After running this script with `bash setup.sh`, define the following `docker-compose.yml`:
After creating the data directory, define the following `docker-compose.yml`:
Contributor
Copy link
# cat > docker-compose.yml
services:
 docker-in-docker:
 image: docker:28-dind
 hostname: docker
 privileged: true
 environment:
 DOCKER_TLS_CERTDIR: /certs
 DOCKER_HOST: docker-in-docker
 volumes:
 - ./certs:/certs
 runner:
 image: code.forgejo.org/forgejo/runner:9.0.3
 environment:
 DOCKER_HOST: tcp://docker:2376
 DOCKER_CERT_PATH: /certs/client
 DOCKER_TLS_VERIFY: "1"
 depends_on:
 docker-in-docker:
 condition: service_started
 volumes:
 - ./data:/data
 - ./certs:/certs
 user: 1001:1001
 command: forgejo-runner daemon
```sh # cat > docker-compose.yml services: docker-in-docker: image: docker:28-dind hostname: docker privileged: true environment: DOCKER_TLS_CERTDIR: /certs DOCKER_HOST: docker-in-docker volumes: - ./certs:/certs runner: image: code.forgejo.org/forgejo/runner:9.0.3 environment: DOCKER_HOST: tcp://docker:2376 DOCKER_CERT_PATH: /certs/client DOCKER_TLS_VERIFY: "1" depends_on: docker-in-docker: condition: service_started volumes: - ./data:/data - ./certs:/certs user: 1001:1001 command: forgejo-runner daemon ```
@ -436,3 +422,3 @@
```
Here, we're not running the `forgejo-runner daemon` yet because we need to register it first. Please note that in a recent install of docker `docker-compose` is not a separate command but should be run as `docker compose`.
To execute the `forgejo-runner` command in the `runner` container, you have to run `docker compose run -u 1001 --rm -it runner forgejo-runner`. Use this command now to [register](#standard-registration) your runner.
Contributor
Copy link
# forgejo-runner-9.0.3 register --no-interactive --instance https://v13.next.forgejo.org --name runner --token $REGISTRATION_TOKEN
INFO Registering runner, arch=amd64, os=linux, version=v9.0.3. 
DEBU Successfully pinged the Forgejo instance server 
INFO Runner registered successfully. 

https://v13.next.forgejo.org/earl-warren/testdockercomposerunner/src/branch/main/.forgejo/workflows/test.yml

```sh # forgejo-runner-9.0.3 register --no-interactive --instance https://v13.next.forgejo.org --name runner --token $REGISTRATION_TOKEN INFO Registering runner, arch=amd64, os=linux, version=v9.0.3. DEBU Successfully pinged the Forgejo instance server INFO Runner registered successfully. ``` https://v13.next.forgejo.org/earl-warren/testdockercomposerunner/src/branch/main/.forgejo/workflows/test.yml
@ -450,3 +426,1 @@
```
Here, the sleep allows the `docker-in-docker` service to start up before the `forgejo-runner daemon` is started.
After registering your runner, you can start the runner with `docker compose up -d` and verify that the runner is connected to `forgejo` by going to `<your forgejo instance>/admin/actions/runners` and seeing whether your runner is marked as idle.
Contributor
Copy link
![image](/attachments/3fffb018-c3ee-414e-bcef-e49cd5c3f1d1) ![image](/attachments/ec808b92-730a-43ef-9d4f-daa64bb66b71)
Contributor
Copy link
![image](/attachments/e2d5a4af-62a9-4d4a-90c5-9610f7fa45d3) https://v13.next.forgejo.org/earl-warren/testdockercomposerunner/settings/actions/runners
Contributor
Copy link

This is where troubleshooting instructions would be needed. I'm quite sure that if you do exactly what I did you'll get exactly the same failure.

This is where troubleshooting instructions would be needed. I'm quite sure that if you do exactly what I did you'll get exactly the same failure.
Author
First-time contributor
Copy link

I was able to reproduce this behavior and fix it by creating the certs folder together with data. I'll add that to the instructions.

I was able to reproduce this behavior and fix it by creating the `certs` folder together with `data`. I'll add that to the instructions.
Create certs together with data to prevent issue with finding CA files.
Some checks failed
pr / preview (pull_request_target) Failing after 26s
c03646e803
Contributor
Copy link

@CSDUMMI can you please archive / document the output of your actions to repeat the instructions in the same way I did? Provided that I will repeat the process from scratch myself.

@CSDUMMI can you please archive / document the output of your actions to repeat the instructions in the same way I did? Provided that I will repeat the process from scratch myself.
Some checks failed
pr / preview (pull_request_target) Failing after 26s
Required
Details
This pull request has changes conflicting with the target branch.
  • docs/admin/actions/runner-installation.md
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u next:CSDUMMI-next
git switch CSDUMMI-next
Sign in to join this conversation.
No reviewers
Labels
Clear labels
404

Broken links or missing content
backport/v1.19

Changes which should be backported to the v1.19 docs

Archived

backport/v1.20

Changes which should be backported to the v1.20 docs

Archived

backport/v1.21

Changes which should be backported to the v1.21 docs

Archived

backport/v10.0

Automated backport to v10.0

Archived

backport/v11.0

Automated backport to v11.0
backport/v12.0

Automated backport to v12.0

Archived

backport/v13.0

Automated backport to v13.0
backport/v14.0

Automated backport to v14.0
backport/v7.0

Automated backport to the v7.0 docs

Archived

backport/v8.0

Automated backport to the v8.0 docs

Archived

backport/v9.0

Automated backport to the v9.0 docs

Archived

good first issue

This issue is suitable for "drive-by contributors" wanting to contribute for the first time, and fixing it should be straightforward.
meta

Tooling and processes for maintaining the docs
new docs

Content to be added to the documentation

Archived

User research - Accessibility

Requires input about accessibility features, likely involves user testing.
User research - Blocked

Do not pick as-is! We are happy if you can help, but please coordinate with ongoing redesign in this area.
User research - Community

Community features, such as discovering other people's work or otherwise feeling welcome on a Forgejo instance.
User research - Config (instance)

Instance-wide configuration, authentication and other admin-only needs.
User research - Errors

How to deal with errors in the application and write helpful error messages.
User research - Filters

How filter and search is being worked with.
User research - Future backlog

The issue might be inspiring for future design work.
User research - Git workflow

AGit, fork-based and new Git workflow, PR creation etc
User research - Labels

Active research about Labels
User research - Moderation

Moderation Featuers for Admins are undergoing active User Research
User research - Needs input

Use this label to let the User Research team know their input is requested.
User research - Notifications/Dashboard

Research on how users should know what to do next.
User research - Rendering

Text rendering, markup languages etc
User research - Repo creation

Active research about the New Repo dialog.
User research - Repo units

The repo sections, disabling them and the "Add more" button.
User research - Security
User research - Settings (in-app)

How to structure in-app settings in the future?
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/docs!1385
Reference in a new issue
forgejo/docs
No description provided.
Delete branch "CSDUMMI/docs:next"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?